...

Source file src/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2022-08-15/documentdb/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2022-08-15/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/cosmos-db/mgmt/2022-08-15/documentdb"
    22  
    23  // AccountKeyMetadata the metadata related to an access key for a given database account.
    24  type AccountKeyMetadata struct {
    25  	// GenerationTime - READ-ONLY; Generation time in UTC of the key in ISO-8601 format. If the value is missing from the object, it means that the last key regeneration was triggered before 2022-06-18.
    26  	GenerationTime *date.Time `json:"generationTime,omitempty"`
    27  }
    28  
    29  // MarshalJSON is the custom marshaler for AccountKeyMetadata.
    30  func (akm AccountKeyMetadata) MarshalJSON() ([]byte, error) {
    31  	objectMap := make(map[string]interface{})
    32  	return json.Marshal(objectMap)
    33  }
    34  
    35  // AnalyticalStorageConfiguration analytical storage specific properties.
    36  type AnalyticalStorageConfiguration struct {
    37  	// SchemaType - Possible values include: 'WellDefined', 'FullFidelity'
    38  	SchemaType AnalyticalStorageSchemaType `json:"schemaType,omitempty"`
    39  }
    40  
    41  // APIProperties ...
    42  type APIProperties struct {
    43  	// ServerVersion - Describes the ServerVersion of an a MongoDB account. Possible values include: 'ThreeFullStopTwo', 'ThreeFullStopSix', 'FourFullStopZero', 'FourFullStopTwo'
    44  	ServerVersion ServerVersion `json:"serverVersion,omitempty"`
    45  }
    46  
    47  // ARMProxyResource the resource model definition for a ARM proxy resource. It will have everything other
    48  // than required location and tags
    49  type ARMProxyResource struct {
    50  	// ID - READ-ONLY; The unique resource identifier of the database account.
    51  	ID *string `json:"id,omitempty"`
    52  	// Name - READ-ONLY; The name of the database account.
    53  	Name *string `json:"name,omitempty"`
    54  	// Type - READ-ONLY; The type of Azure resource.
    55  	Type *string `json:"type,omitempty"`
    56  }
    57  
    58  // MarshalJSON is the custom marshaler for ARMProxyResource.
    59  func (apr ARMProxyResource) MarshalJSON() ([]byte, error) {
    60  	objectMap := make(map[string]interface{})
    61  	return json.Marshal(objectMap)
    62  }
    63  
    64  // ARMResourceProperties the core properties of ARM resources.
    65  type ARMResourceProperties struct {
    66  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
    67  	ID *string `json:"id,omitempty"`
    68  	// Name - READ-ONLY; The name of the ARM resource.
    69  	Name *string `json:"name,omitempty"`
    70  	// Type - READ-ONLY; The type of Azure resource.
    71  	Type *string `json:"type,omitempty"`
    72  	// Location - The location of the resource group to which the resource belongs.
    73  	Location *string            `json:"location,omitempty"`
    74  	Tags     map[string]*string `json:"tags"`
    75  }
    76  
    77  // MarshalJSON is the custom marshaler for ARMResourceProperties.
    78  func (arp ARMResourceProperties) MarshalJSON() ([]byte, error) {
    79  	objectMap := make(map[string]interface{})
    80  	if arp.Location != nil {
    81  		objectMap["location"] = arp.Location
    82  	}
    83  	if arp.Tags != nil {
    84  		objectMap["tags"] = arp.Tags
    85  	}
    86  	return json.Marshal(objectMap)
    87  }
    88  
    89  // AutoscaleSettings ...
    90  type AutoscaleSettings struct {
    91  	// MaxThroughput - Represents maximum throughput, the resource can scale up to.
    92  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    93  }
    94  
    95  // AutoscaleSettingsResource cosmos DB provisioned throughput settings object
    96  type AutoscaleSettingsResource struct {
    97  	// MaxThroughput - Represents maximum throughput container can scale up to.
    98  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    99  	// AutoUpgradePolicy - Cosmos DB resource auto-upgrade policy
   100  	AutoUpgradePolicy *AutoUpgradePolicyResource `json:"autoUpgradePolicy,omitempty"`
   101  	// TargetMaxThroughput - READ-ONLY; Represents target maximum throughput container can scale up to once offer is no longer in pending state.
   102  	TargetMaxThroughput *int32 `json:"targetMaxThroughput,omitempty"`
   103  }
   104  
   105  // MarshalJSON is the custom marshaler for AutoscaleSettingsResource.
   106  func (asr AutoscaleSettingsResource) MarshalJSON() ([]byte, error) {
   107  	objectMap := make(map[string]interface{})
   108  	if asr.MaxThroughput != nil {
   109  		objectMap["maxThroughput"] = asr.MaxThroughput
   110  	}
   111  	if asr.AutoUpgradePolicy != nil {
   112  		objectMap["autoUpgradePolicy"] = asr.AutoUpgradePolicy
   113  	}
   114  	return json.Marshal(objectMap)
   115  }
   116  
   117  // AutoUpgradePolicyResource cosmos DB resource auto-upgrade policy
   118  type AutoUpgradePolicyResource struct {
   119  	// ThroughputPolicy - Represents throughput policy which service must adhere to for auto-upgrade
   120  	ThroughputPolicy *ThroughputPolicyResource `json:"throughputPolicy,omitempty"`
   121  }
   122  
   123  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   124  type AzureEntityResource struct {
   125  	// Etag - READ-ONLY; Resource Etag.
   126  	Etag *string `json:"etag,omitempty"`
   127  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   128  	ID *string `json:"id,omitempty"`
   129  	// Name - READ-ONLY; The name of the resource
   130  	Name *string `json:"name,omitempty"`
   131  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   132  	Type *string `json:"type,omitempty"`
   133  }
   134  
   135  // MarshalJSON is the custom marshaler for AzureEntityResource.
   136  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   137  	objectMap := make(map[string]interface{})
   138  	return json.Marshal(objectMap)
   139  }
   140  
   141  // BackupInformation backup information of a resource.
   142  type BackupInformation struct {
   143  	autorest.Response `json:"-"`
   144  	// ContinuousBackupInformation - Information about the status of continuous backups.
   145  	ContinuousBackupInformation *ContinuousBackupInformation `json:"continuousBackupInformation,omitempty"`
   146  }
   147  
   148  // BasicBackupPolicy the object representing the policy for taking backups on an account.
   149  type BasicBackupPolicy interface {
   150  	AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool)
   151  	AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool)
   152  	AsBackupPolicy() (*BackupPolicy, bool)
   153  }
   154  
   155  // BackupPolicy the object representing the policy for taking backups on an account.
   156  type BackupPolicy struct {
   157  	// MigrationState - The object representing the state of the migration between the backup policies.
   158  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
   159  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
   160  	Type Type `json:"type,omitempty"`
   161  }
   162  
   163  func unmarshalBasicBackupPolicy(body []byte) (BasicBackupPolicy, error) {
   164  	var m map[string]interface{}
   165  	err := json.Unmarshal(body, &m)
   166  	if err != nil {
   167  		return nil, err
   168  	}
   169  
   170  	switch m["type"] {
   171  	case string(TypePeriodic):
   172  		var pmbp PeriodicModeBackupPolicy
   173  		err := json.Unmarshal(body, &pmbp)
   174  		return pmbp, err
   175  	case string(TypeContinuous):
   176  		var cmbp ContinuousModeBackupPolicy
   177  		err := json.Unmarshal(body, &cmbp)
   178  		return cmbp, err
   179  	default:
   180  		var bp BackupPolicy
   181  		err := json.Unmarshal(body, &bp)
   182  		return bp, err
   183  	}
   184  }
   185  func unmarshalBasicBackupPolicyArray(body []byte) ([]BasicBackupPolicy, error) {
   186  	var rawMessages []*json.RawMessage
   187  	err := json.Unmarshal(body, &rawMessages)
   188  	if err != nil {
   189  		return nil, err
   190  	}
   191  
   192  	bpArray := make([]BasicBackupPolicy, len(rawMessages))
   193  
   194  	for index, rawMessage := range rawMessages {
   195  		bp, err := unmarshalBasicBackupPolicy(*rawMessage)
   196  		if err != nil {
   197  			return nil, err
   198  		}
   199  		bpArray[index] = bp
   200  	}
   201  	return bpArray, nil
   202  }
   203  
   204  // MarshalJSON is the custom marshaler for BackupPolicy.
   205  func (bp BackupPolicy) MarshalJSON() ([]byte, error) {
   206  	bp.Type = TypeBackupPolicy
   207  	objectMap := make(map[string]interface{})
   208  	if bp.MigrationState != nil {
   209  		objectMap["migrationState"] = bp.MigrationState
   210  	}
   211  	if bp.Type != "" {
   212  		objectMap["type"] = bp.Type
   213  	}
   214  	return json.Marshal(objectMap)
   215  }
   216  
   217  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   218  func (bp BackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
   219  	return nil, false
   220  }
   221  
   222  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   223  func (bp BackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
   224  	return nil, false
   225  }
   226  
   227  // AsBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   228  func (bp BackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
   229  	return &bp, true
   230  }
   231  
   232  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   233  func (bp BackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
   234  	return &bp, true
   235  }
   236  
   237  // BackupPolicyMigrationState the object representing the state of the migration between the backup
   238  // policies.
   239  type BackupPolicyMigrationState struct {
   240  	// Status - Describes the status of migration between backup policy types. Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed'
   241  	Status BackupPolicyMigrationStatus `json:"status,omitempty"`
   242  	// TargetType - Describes the target backup policy type of the backup policy migration. Possible values include: 'Periodic', 'Continuous'
   243  	TargetType BackupPolicyType `json:"targetType,omitempty"`
   244  	// StartTime - Time at which the backup policy migration started (ISO-8601 format).
   245  	StartTime *date.Time `json:"startTime,omitempty"`
   246  }
   247  
   248  // Capability cosmos DB capability object
   249  type Capability struct {
   250  	// Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".
   251  	Name *string `json:"name,omitempty"`
   252  }
   253  
   254  // Capacity the object that represents all properties related to capacity enforcement on an account.
   255  type Capacity struct {
   256  	// TotalThroughputLimit - The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput.
   257  	TotalThroughputLimit *int32 `json:"totalThroughputLimit,omitempty"`
   258  }
   259  
   260  // CassandraClusterPublicStatus properties of a managed Cassandra cluster public status.
   261  type CassandraClusterPublicStatus struct {
   262  	autorest.Response `json:"-"`
   263  	ETag              *string                       `json:"eTag,omitempty"`
   264  	ReaperStatus      *ManagedCassandraReaperStatus `json:"reaperStatus,omitempty"`
   265  	// ConnectionErrors - List relevant information about any connection errors to the Datacenters.
   266  	ConnectionErrors *[]ConnectionError `json:"connectionErrors,omitempty"`
   267  	// DataCenters - List of the status of each datacenter in this cluster.
   268  	DataCenters *[]CassandraClusterPublicStatusDataCentersItem `json:"dataCenters,omitempty"`
   269  }
   270  
   271  // CassandraClusterPublicStatusDataCentersItem ...
   272  type CassandraClusterPublicStatusDataCentersItem struct {
   273  	// Name - The name of this Datacenter.
   274  	Name *string `json:"name,omitempty"`
   275  	// SeedNodes - A list of all seed nodes in the cluster, managed and unmanaged.
   276  	SeedNodes *[]string                                               `json:"seedNodes,omitempty"`
   277  	Nodes     *[]CassandraClusterPublicStatusDataCentersItemNodesItem `json:"nodes,omitempty"`
   278  }
   279  
   280  // CassandraClusterPublicStatusDataCentersItemNodesItem ...
   281  type CassandraClusterPublicStatusDataCentersItemNodesItem struct {
   282  	// Address - The node's IP address.
   283  	Address *string `json:"address,omitempty"`
   284  	// State - Possible values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped'
   285  	State  NodeState `json:"state,omitempty"`
   286  	Status *string   `json:"status,omitempty"`
   287  	// 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 cells or tombstones) is counted.
   288  	Load *string `json:"load,omitempty"`
   289  	// Tokens - List of tokens this node covers.
   290  	Tokens *[]string `json:"tokens,omitempty"`
   291  	Size   *int32    `json:"size,omitempty"`
   292  	// HostID - The network ID of the node.
   293  	HostID *string `json:"hostID,omitempty"`
   294  	// Rack - The rack this node is part of.
   295  	Rack *string `json:"rack,omitempty"`
   296  	// Timestamp - The timestamp when these statistics were captured.
   297  	Timestamp *string `json:"timestamp,omitempty"`
   298  	// DiskUsedKB - The amount of disk used, in kB, of the directory /var/lib/cassandra.
   299  	DiskUsedKB *int64 `json:"diskUsedKB,omitempty"`
   300  	// DiskFreeKB - The amount of disk free, in kB, of the directory /var/lib/cassandra.
   301  	DiskFreeKB *int64 `json:"diskFreeKB,omitempty"`
   302  	// MemoryUsedKB - Used memory (calculated as total - free - buffers - cache), in kB.
   303  	MemoryUsedKB *int64 `json:"memoryUsedKB,omitempty"`
   304  	// MemoryBuffersAndCachedKB - Memory used by kernel buffers (Buffers in /proc/meminfo) and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
   305  	MemoryBuffersAndCachedKB *int64 `json:"memoryBuffersAndCachedKB,omitempty"`
   306  	// MemoryFreeKB - Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
   307  	MemoryFreeKB *int64 `json:"memoryFreeKB,omitempty"`
   308  	// MemoryTotalKB - Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB.
   309  	MemoryTotalKB *int64 `json:"memoryTotalKB,omitempty"`
   310  	// CPUUsage - A float representing the current system-wide CPU utilization as a percentage.
   311  	CPUUsage *float64 `json:"cpuUsage,omitempty"`
   312  }
   313  
   314  // CassandraClustersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   315  // long-running operation.
   316  type CassandraClustersCreateUpdateFuture struct {
   317  	azure.FutureAPI
   318  	// Result returns the result of the asynchronous operation.
   319  	// If the operation has not completed it will return an error.
   320  	Result func(CassandraClustersClient) (ClusterResource, error)
   321  }
   322  
   323  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   324  func (future *CassandraClustersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   325  	var azFuture azure.Future
   326  	if err := json.Unmarshal(body, &azFuture); err != nil {
   327  		return err
   328  	}
   329  	future.FutureAPI = &azFuture
   330  	future.Result = future.result
   331  	return nil
   332  }
   333  
   334  // result is the default implementation for CassandraClustersCreateUpdateFuture.Result.
   335  func (future *CassandraClustersCreateUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   336  	var done bool
   337  	done, err = future.DoneWithContext(context.Background(), client)
   338  	if err != nil {
   339  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   340  		return
   341  	}
   342  	if !done {
   343  		cr.Response.Response = future.Response()
   344  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersCreateUpdateFuture")
   345  		return
   346  	}
   347  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   348  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   349  		cr, err = client.CreateUpdateResponder(cr.Response.Response)
   350  		if err != nil {
   351  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   352  		}
   353  	}
   354  	return
   355  }
   356  
   357  // CassandraClustersDeallocateFuture an abstraction for monitoring and retrieving the results of a
   358  // long-running operation.
   359  type CassandraClustersDeallocateFuture struct {
   360  	azure.FutureAPI
   361  	// Result returns the result of the asynchronous operation.
   362  	// If the operation has not completed it will return an error.
   363  	Result func(CassandraClustersClient) (autorest.Response, error)
   364  }
   365  
   366  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   367  func (future *CassandraClustersDeallocateFuture) UnmarshalJSON(body []byte) error {
   368  	var azFuture azure.Future
   369  	if err := json.Unmarshal(body, &azFuture); err != nil {
   370  		return err
   371  	}
   372  	future.FutureAPI = &azFuture
   373  	future.Result = future.result
   374  	return nil
   375  }
   376  
   377  // result is the default implementation for CassandraClustersDeallocateFuture.Result.
   378  func (future *CassandraClustersDeallocateFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   379  	var done bool
   380  	done, err = future.DoneWithContext(context.Background(), client)
   381  	if err != nil {
   382  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersDeallocateFuture", "Result", future.Response(), "Polling failure")
   383  		return
   384  	}
   385  	if !done {
   386  		ar.Response = future.Response()
   387  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersDeallocateFuture")
   388  		return
   389  	}
   390  	ar.Response = future.Response()
   391  	return
   392  }
   393  
   394  // CassandraClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
   395  // operation.
   396  type CassandraClustersDeleteFuture struct {
   397  	azure.FutureAPI
   398  	// Result returns the result of the asynchronous operation.
   399  	// If the operation has not completed it will return an error.
   400  	Result func(CassandraClustersClient) (autorest.Response, error)
   401  }
   402  
   403  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   404  func (future *CassandraClustersDeleteFuture) UnmarshalJSON(body []byte) error {
   405  	var azFuture azure.Future
   406  	if err := json.Unmarshal(body, &azFuture); err != nil {
   407  		return err
   408  	}
   409  	future.FutureAPI = &azFuture
   410  	future.Result = future.result
   411  	return nil
   412  }
   413  
   414  // result is the default implementation for CassandraClustersDeleteFuture.Result.
   415  func (future *CassandraClustersDeleteFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   416  	var done bool
   417  	done, err = future.DoneWithContext(context.Background(), client)
   418  	if err != nil {
   419  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersDeleteFuture", "Result", future.Response(), "Polling failure")
   420  		return
   421  	}
   422  	if !done {
   423  		ar.Response = future.Response()
   424  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersDeleteFuture")
   425  		return
   426  	}
   427  	ar.Response = future.Response()
   428  	return
   429  }
   430  
   431  // CassandraClustersInvokeCommandFuture an abstraction for monitoring and retrieving the results of a
   432  // long-running operation.
   433  type CassandraClustersInvokeCommandFuture struct {
   434  	azure.FutureAPI
   435  	// Result returns the result of the asynchronous operation.
   436  	// If the operation has not completed it will return an error.
   437  	Result func(CassandraClustersClient) (CommandOutput, error)
   438  }
   439  
   440  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   441  func (future *CassandraClustersInvokeCommandFuture) UnmarshalJSON(body []byte) error {
   442  	var azFuture azure.Future
   443  	if err := json.Unmarshal(body, &azFuture); err != nil {
   444  		return err
   445  	}
   446  	future.FutureAPI = &azFuture
   447  	future.Result = future.result
   448  	return nil
   449  }
   450  
   451  // result is the default implementation for CassandraClustersInvokeCommandFuture.Result.
   452  func (future *CassandraClustersInvokeCommandFuture) result(client CassandraClustersClient) (co CommandOutput, err error) {
   453  	var done bool
   454  	done, err = future.DoneWithContext(context.Background(), client)
   455  	if err != nil {
   456  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersInvokeCommandFuture", "Result", future.Response(), "Polling failure")
   457  		return
   458  	}
   459  	if !done {
   460  		co.Response.Response = future.Response()
   461  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersInvokeCommandFuture")
   462  		return
   463  	}
   464  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   465  	if co.Response.Response, err = future.GetResult(sender); err == nil && co.Response.Response.StatusCode != http.StatusNoContent {
   466  		co, err = client.InvokeCommandResponder(co.Response.Response)
   467  		if err != nil {
   468  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersInvokeCommandFuture", "Result", co.Response.Response, "Failure responding to request")
   469  		}
   470  	}
   471  	return
   472  }
   473  
   474  // CassandraClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running
   475  // operation.
   476  type CassandraClustersStartFuture struct {
   477  	azure.FutureAPI
   478  	// Result returns the result of the asynchronous operation.
   479  	// If the operation has not completed it will return an error.
   480  	Result func(CassandraClustersClient) (autorest.Response, error)
   481  }
   482  
   483  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   484  func (future *CassandraClustersStartFuture) UnmarshalJSON(body []byte) error {
   485  	var azFuture azure.Future
   486  	if err := json.Unmarshal(body, &azFuture); err != nil {
   487  		return err
   488  	}
   489  	future.FutureAPI = &azFuture
   490  	future.Result = future.result
   491  	return nil
   492  }
   493  
   494  // result is the default implementation for CassandraClustersStartFuture.Result.
   495  func (future *CassandraClustersStartFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   496  	var done bool
   497  	done, err = future.DoneWithContext(context.Background(), client)
   498  	if err != nil {
   499  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersStartFuture", "Result", future.Response(), "Polling failure")
   500  		return
   501  	}
   502  	if !done {
   503  		ar.Response = future.Response()
   504  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersStartFuture")
   505  		return
   506  	}
   507  	ar.Response = future.Response()
   508  	return
   509  }
   510  
   511  // CassandraClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
   512  // operation.
   513  type CassandraClustersUpdateFuture struct {
   514  	azure.FutureAPI
   515  	// Result returns the result of the asynchronous operation.
   516  	// If the operation has not completed it will return an error.
   517  	Result func(CassandraClustersClient) (ClusterResource, error)
   518  }
   519  
   520  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   521  func (future *CassandraClustersUpdateFuture) UnmarshalJSON(body []byte) error {
   522  	var azFuture azure.Future
   523  	if err := json.Unmarshal(body, &azFuture); err != nil {
   524  		return err
   525  	}
   526  	future.FutureAPI = &azFuture
   527  	future.Result = future.result
   528  	return nil
   529  }
   530  
   531  // result is the default implementation for CassandraClustersUpdateFuture.Result.
   532  func (future *CassandraClustersUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   533  	var done bool
   534  	done, err = future.DoneWithContext(context.Background(), client)
   535  	if err != nil {
   536  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", future.Response(), "Polling failure")
   537  		return
   538  	}
   539  	if !done {
   540  		cr.Response.Response = future.Response()
   541  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersUpdateFuture")
   542  		return
   543  	}
   544  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   545  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   546  		cr, err = client.UpdateResponder(cr.Response.Response)
   547  		if err != nil {
   548  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   549  		}
   550  	}
   551  	return
   552  }
   553  
   554  // CassandraDataCentersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   555  // long-running operation.
   556  type CassandraDataCentersCreateUpdateFuture struct {
   557  	azure.FutureAPI
   558  	// Result returns the result of the asynchronous operation.
   559  	// If the operation has not completed it will return an error.
   560  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   561  }
   562  
   563  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   564  func (future *CassandraDataCentersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   565  	var azFuture azure.Future
   566  	if err := json.Unmarshal(body, &azFuture); err != nil {
   567  		return err
   568  	}
   569  	future.FutureAPI = &azFuture
   570  	future.Result = future.result
   571  	return nil
   572  }
   573  
   574  // result is the default implementation for CassandraDataCentersCreateUpdateFuture.Result.
   575  func (future *CassandraDataCentersCreateUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   576  	var done bool
   577  	done, err = future.DoneWithContext(context.Background(), client)
   578  	if err != nil {
   579  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   580  		return
   581  	}
   582  	if !done {
   583  		dcr.Response.Response = future.Response()
   584  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersCreateUpdateFuture")
   585  		return
   586  	}
   587  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   588  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   589  		dcr, err = client.CreateUpdateResponder(dcr.Response.Response)
   590  		if err != nil {
   591  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   592  		}
   593  	}
   594  	return
   595  }
   596  
   597  // CassandraDataCentersDeleteFuture an abstraction for monitoring and retrieving the results of a
   598  // long-running operation.
   599  type CassandraDataCentersDeleteFuture struct {
   600  	azure.FutureAPI
   601  	// Result returns the result of the asynchronous operation.
   602  	// If the operation has not completed it will return an error.
   603  	Result func(CassandraDataCentersClient) (autorest.Response, error)
   604  }
   605  
   606  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   607  func (future *CassandraDataCentersDeleteFuture) UnmarshalJSON(body []byte) error {
   608  	var azFuture azure.Future
   609  	if err := json.Unmarshal(body, &azFuture); err != nil {
   610  		return err
   611  	}
   612  	future.FutureAPI = &azFuture
   613  	future.Result = future.result
   614  	return nil
   615  }
   616  
   617  // result is the default implementation for CassandraDataCentersDeleteFuture.Result.
   618  func (future *CassandraDataCentersDeleteFuture) result(client CassandraDataCentersClient) (ar autorest.Response, err error) {
   619  	var done bool
   620  	done, err = future.DoneWithContext(context.Background(), client)
   621  	if err != nil {
   622  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersDeleteFuture", "Result", future.Response(), "Polling failure")
   623  		return
   624  	}
   625  	if !done {
   626  		ar.Response = future.Response()
   627  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersDeleteFuture")
   628  		return
   629  	}
   630  	ar.Response = future.Response()
   631  	return
   632  }
   633  
   634  // CassandraDataCentersUpdateFuture an abstraction for monitoring and retrieving the results of a
   635  // long-running operation.
   636  type CassandraDataCentersUpdateFuture struct {
   637  	azure.FutureAPI
   638  	// Result returns the result of the asynchronous operation.
   639  	// If the operation has not completed it will return an error.
   640  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   641  }
   642  
   643  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   644  func (future *CassandraDataCentersUpdateFuture) UnmarshalJSON(body []byte) error {
   645  	var azFuture azure.Future
   646  	if err := json.Unmarshal(body, &azFuture); err != nil {
   647  		return err
   648  	}
   649  	future.FutureAPI = &azFuture
   650  	future.Result = future.result
   651  	return nil
   652  }
   653  
   654  // result is the default implementation for CassandraDataCentersUpdateFuture.Result.
   655  func (future *CassandraDataCentersUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   656  	var done bool
   657  	done, err = future.DoneWithContext(context.Background(), client)
   658  	if err != nil {
   659  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", future.Response(), "Polling failure")
   660  		return
   661  	}
   662  	if !done {
   663  		dcr.Response.Response = future.Response()
   664  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersUpdateFuture")
   665  		return
   666  	}
   667  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   668  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   669  		dcr, err = client.UpdateResponder(dcr.Response.Response)
   670  		if err != nil {
   671  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   672  		}
   673  	}
   674  	return
   675  }
   676  
   677  // CassandraKeyspaceCreateUpdateParameters parameters to create and update Cosmos DB Cassandra keyspace.
   678  type CassandraKeyspaceCreateUpdateParameters struct {
   679  	// CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
   680  	*CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"`
   681  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   682  	ID *string `json:"id,omitempty"`
   683  	// Name - READ-ONLY; The name of the ARM resource.
   684  	Name *string `json:"name,omitempty"`
   685  	// Type - READ-ONLY; The type of Azure resource.
   686  	Type *string `json:"type,omitempty"`
   687  	// Location - The location of the resource group to which the resource belongs.
   688  	Location *string            `json:"location,omitempty"`
   689  	Tags     map[string]*string `json:"tags"`
   690  }
   691  
   692  // MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateParameters.
   693  func (ckcup CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
   694  	objectMap := make(map[string]interface{})
   695  	if ckcup.CassandraKeyspaceCreateUpdateProperties != nil {
   696  		objectMap["properties"] = ckcup.CassandraKeyspaceCreateUpdateProperties
   697  	}
   698  	if ckcup.Location != nil {
   699  		objectMap["location"] = ckcup.Location
   700  	}
   701  	if ckcup.Tags != nil {
   702  		objectMap["tags"] = ckcup.Tags
   703  	}
   704  	return json.Marshal(objectMap)
   705  }
   706  
   707  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceCreateUpdateParameters struct.
   708  func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) error {
   709  	var m map[string]*json.RawMessage
   710  	err := json.Unmarshal(body, &m)
   711  	if err != nil {
   712  		return err
   713  	}
   714  	for k, v := range m {
   715  		switch k {
   716  		case "properties":
   717  			if v != nil {
   718  				var cassandraKeyspaceCreateUpdateProperties CassandraKeyspaceCreateUpdateProperties
   719  				err = json.Unmarshal(*v, &cassandraKeyspaceCreateUpdateProperties)
   720  				if err != nil {
   721  					return err
   722  				}
   723  				ckcup.CassandraKeyspaceCreateUpdateProperties = &cassandraKeyspaceCreateUpdateProperties
   724  			}
   725  		case "id":
   726  			if v != nil {
   727  				var ID string
   728  				err = json.Unmarshal(*v, &ID)
   729  				if err != nil {
   730  					return err
   731  				}
   732  				ckcup.ID = &ID
   733  			}
   734  		case "name":
   735  			if v != nil {
   736  				var name string
   737  				err = json.Unmarshal(*v, &name)
   738  				if err != nil {
   739  					return err
   740  				}
   741  				ckcup.Name = &name
   742  			}
   743  		case "type":
   744  			if v != nil {
   745  				var typeVar string
   746  				err = json.Unmarshal(*v, &typeVar)
   747  				if err != nil {
   748  					return err
   749  				}
   750  				ckcup.Type = &typeVar
   751  			}
   752  		case "location":
   753  			if v != nil {
   754  				var location string
   755  				err = json.Unmarshal(*v, &location)
   756  				if err != nil {
   757  					return err
   758  				}
   759  				ckcup.Location = &location
   760  			}
   761  		case "tags":
   762  			if v != nil {
   763  				var tags map[string]*string
   764  				err = json.Unmarshal(*v, &tags)
   765  				if err != nil {
   766  					return err
   767  				}
   768  				ckcup.Tags = tags
   769  			}
   770  		}
   771  	}
   772  
   773  	return nil
   774  }
   775  
   776  // CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra
   777  // keyspace.
   778  type CassandraKeyspaceCreateUpdateProperties struct {
   779  	// Resource - The standard JSON format of a Cassandra keyspace
   780  	Resource *CassandraKeyspaceResource `json:"resource,omitempty"`
   781  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
   782  	Options *CreateUpdateOptions `json:"options,omitempty"`
   783  }
   784  
   785  // CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace
   786  type CassandraKeyspaceGetProperties struct {
   787  	Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"`
   788  	Options  *CassandraKeyspaceGetPropertiesOptions  `json:"options,omitempty"`
   789  }
   790  
   791  // CassandraKeyspaceGetPropertiesOptions ...
   792  type CassandraKeyspaceGetPropertiesOptions struct {
   793  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
   794  	Throughput *int32 `json:"throughput,omitempty"`
   795  	// AutoscaleSettings - Specifies the Autoscale settings.
   796  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
   797  }
   798  
   799  // CassandraKeyspaceGetPropertiesResource ...
   800  type CassandraKeyspaceGetPropertiesResource struct {
   801  	// ID - Name of the Cosmos DB Cassandra keyspace
   802  	ID *string `json:"id,omitempty"`
   803  	// Rid - READ-ONLY; A system generated property. A unique identifier.
   804  	Rid *string `json:"_rid,omitempty"`
   805  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
   806  	Ts *float64 `json:"_ts,omitempty"`
   807  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
   808  	Etag *string `json:"_etag,omitempty"`
   809  }
   810  
   811  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetPropertiesResource.
   812  func (ckgp CassandraKeyspaceGetPropertiesResource) MarshalJSON() ([]byte, error) {
   813  	objectMap := make(map[string]interface{})
   814  	if ckgp.ID != nil {
   815  		objectMap["id"] = ckgp.ID
   816  	}
   817  	return json.Marshal(objectMap)
   818  }
   819  
   820  // CassandraKeyspaceGetResults an Azure Cosmos DB Cassandra keyspace.
   821  type CassandraKeyspaceGetResults struct {
   822  	autorest.Response `json:"-"`
   823  	// CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace
   824  	*CassandraKeyspaceGetProperties `json:"properties,omitempty"`
   825  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   826  	ID *string `json:"id,omitempty"`
   827  	// Name - READ-ONLY; The name of the ARM resource.
   828  	Name *string `json:"name,omitempty"`
   829  	// Type - READ-ONLY; The type of Azure resource.
   830  	Type *string `json:"type,omitempty"`
   831  	// Location - The location of the resource group to which the resource belongs.
   832  	Location *string            `json:"location,omitempty"`
   833  	Tags     map[string]*string `json:"tags"`
   834  }
   835  
   836  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetResults.
   837  func (ckgr CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error) {
   838  	objectMap := make(map[string]interface{})
   839  	if ckgr.CassandraKeyspaceGetProperties != nil {
   840  		objectMap["properties"] = ckgr.CassandraKeyspaceGetProperties
   841  	}
   842  	if ckgr.Location != nil {
   843  		objectMap["location"] = ckgr.Location
   844  	}
   845  	if ckgr.Tags != nil {
   846  		objectMap["tags"] = ckgr.Tags
   847  	}
   848  	return json.Marshal(objectMap)
   849  }
   850  
   851  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceGetResults struct.
   852  func (ckgr *CassandraKeyspaceGetResults) UnmarshalJSON(body []byte) error {
   853  	var m map[string]*json.RawMessage
   854  	err := json.Unmarshal(body, &m)
   855  	if err != nil {
   856  		return err
   857  	}
   858  	for k, v := range m {
   859  		switch k {
   860  		case "properties":
   861  			if v != nil {
   862  				var cassandraKeyspaceGetProperties CassandraKeyspaceGetProperties
   863  				err = json.Unmarshal(*v, &cassandraKeyspaceGetProperties)
   864  				if err != nil {
   865  					return err
   866  				}
   867  				ckgr.CassandraKeyspaceGetProperties = &cassandraKeyspaceGetProperties
   868  			}
   869  		case "id":
   870  			if v != nil {
   871  				var ID string
   872  				err = json.Unmarshal(*v, &ID)
   873  				if err != nil {
   874  					return err
   875  				}
   876  				ckgr.ID = &ID
   877  			}
   878  		case "name":
   879  			if v != nil {
   880  				var name string
   881  				err = json.Unmarshal(*v, &name)
   882  				if err != nil {
   883  					return err
   884  				}
   885  				ckgr.Name = &name
   886  			}
   887  		case "type":
   888  			if v != nil {
   889  				var typeVar string
   890  				err = json.Unmarshal(*v, &typeVar)
   891  				if err != nil {
   892  					return err
   893  				}
   894  				ckgr.Type = &typeVar
   895  			}
   896  		case "location":
   897  			if v != nil {
   898  				var location string
   899  				err = json.Unmarshal(*v, &location)
   900  				if err != nil {
   901  					return err
   902  				}
   903  				ckgr.Location = &location
   904  			}
   905  		case "tags":
   906  			if v != nil {
   907  				var tags map[string]*string
   908  				err = json.Unmarshal(*v, &tags)
   909  				if err != nil {
   910  					return err
   911  				}
   912  				ckgr.Tags = tags
   913  			}
   914  		}
   915  	}
   916  
   917  	return nil
   918  }
   919  
   920  // CassandraKeyspaceListResult the List operation response, that contains the Cassandra keyspaces and their
   921  // properties.
   922  type CassandraKeyspaceListResult struct {
   923  	autorest.Response `json:"-"`
   924  	// Value - READ-ONLY; List of Cassandra keyspaces and their properties.
   925  	Value *[]CassandraKeyspaceGetResults `json:"value,omitempty"`
   926  }
   927  
   928  // MarshalJSON is the custom marshaler for CassandraKeyspaceListResult.
   929  func (cklr CassandraKeyspaceListResult) MarshalJSON() ([]byte, error) {
   930  	objectMap := make(map[string]interface{})
   931  	return json.Marshal(objectMap)
   932  }
   933  
   934  // CassandraKeyspaceResource cosmos DB Cassandra keyspace resource object
   935  type CassandraKeyspaceResource struct {
   936  	// ID - Name of the Cosmos DB Cassandra keyspace
   937  	ID *string `json:"id,omitempty"`
   938  }
   939  
   940  // CassandraPartitionKey cosmos DB Cassandra table partition key
   941  type CassandraPartitionKey struct {
   942  	// Name - Name of the Cosmos DB Cassandra table partition key
   943  	Name *string `json:"name,omitempty"`
   944  }
   945  
   946  // CassandraResourcesCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the
   947  // results of a long-running operation.
   948  type CassandraResourcesCreateUpdateCassandraKeyspaceFuture struct {
   949  	azure.FutureAPI
   950  	// Result returns the result of the asynchronous operation.
   951  	// If the operation has not completed it will return an error.
   952  	Result func(CassandraResourcesClient) (CassandraKeyspaceGetResults, error)
   953  }
   954  
   955  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   956  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
   957  	var azFuture azure.Future
   958  	if err := json.Unmarshal(body, &azFuture); err != nil {
   959  		return err
   960  	}
   961  	future.FutureAPI = &azFuture
   962  	future.Result = future.result
   963  	return nil
   964  }
   965  
   966  // result is the default implementation for CassandraResourcesCreateUpdateCassandraKeyspaceFuture.Result.
   967  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ckgr CassandraKeyspaceGetResults, err error) {
   968  	var done bool
   969  	done, err = future.DoneWithContext(context.Background(), client)
   970  	if err != nil {
   971  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
   972  		return
   973  	}
   974  	if !done {
   975  		ckgr.Response.Response = future.Response()
   976  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture")
   977  		return
   978  	}
   979  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   980  	if ckgr.Response.Response, err = future.GetResult(sender); err == nil && ckgr.Response.Response.StatusCode != http.StatusNoContent {
   981  		ckgr, err = client.CreateUpdateCassandraKeyspaceResponder(ckgr.Response.Response)
   982  		if err != nil {
   983  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", ckgr.Response.Response, "Failure responding to request")
   984  		}
   985  	}
   986  	return
   987  }
   988  
   989  // CassandraResourcesCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the
   990  // results of a long-running operation.
   991  type CassandraResourcesCreateUpdateCassandraTableFuture struct {
   992  	azure.FutureAPI
   993  	// Result returns the result of the asynchronous operation.
   994  	// If the operation has not completed it will return an error.
   995  	Result func(CassandraResourcesClient) (CassandraTableGetResults, error)
   996  }
   997  
   998  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   999  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) UnmarshalJSON(body []byte) error {
  1000  	var azFuture azure.Future
  1001  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1002  		return err
  1003  	}
  1004  	future.FutureAPI = &azFuture
  1005  	future.Result = future.result
  1006  	return nil
  1007  }
  1008  
  1009  // result is the default implementation for CassandraResourcesCreateUpdateCassandraTableFuture.Result.
  1010  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) result(client CassandraResourcesClient) (ctgr CassandraTableGetResults, err error) {
  1011  	var done bool
  1012  	done, err = future.DoneWithContext(context.Background(), client)
  1013  	if err != nil {
  1014  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", future.Response(), "Polling failure")
  1015  		return
  1016  	}
  1017  	if !done {
  1018  		ctgr.Response.Response = future.Response()
  1019  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraTableFuture")
  1020  		return
  1021  	}
  1022  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1023  	if ctgr.Response.Response, err = future.GetResult(sender); err == nil && ctgr.Response.Response.StatusCode != http.StatusNoContent {
  1024  		ctgr, err = client.CreateUpdateCassandraTableResponder(ctgr.Response.Response)
  1025  		if err != nil {
  1026  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", ctgr.Response.Response, "Failure responding to request")
  1027  		}
  1028  	}
  1029  	return
  1030  }
  1031  
  1032  // CassandraResourcesDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results
  1033  // of a long-running operation.
  1034  type CassandraResourcesDeleteCassandraKeyspaceFuture struct {
  1035  	azure.FutureAPI
  1036  	// Result returns the result of the asynchronous operation.
  1037  	// If the operation has not completed it will return an error.
  1038  	Result func(CassandraResourcesClient) (autorest.Response, error)
  1039  }
  1040  
  1041  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1042  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
  1043  	var azFuture azure.Future
  1044  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1045  		return err
  1046  	}
  1047  	future.FutureAPI = &azFuture
  1048  	future.Result = future.result
  1049  	return nil
  1050  }
  1051  
  1052  // result is the default implementation for CassandraResourcesDeleteCassandraKeyspaceFuture.Result.
  1053  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
  1054  	var done bool
  1055  	done, err = future.DoneWithContext(context.Background(), client)
  1056  	if err != nil {
  1057  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
  1058  		return
  1059  	}
  1060  	if !done {
  1061  		ar.Response = future.Response()
  1062  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture")
  1063  		return
  1064  	}
  1065  	ar.Response = future.Response()
  1066  	return
  1067  }
  1068  
  1069  // CassandraResourcesDeleteCassandraTableFuture an abstraction for monitoring and retrieving the results of
  1070  // a long-running operation.
  1071  type CassandraResourcesDeleteCassandraTableFuture struct {
  1072  	azure.FutureAPI
  1073  	// Result returns the result of the asynchronous operation.
  1074  	// If the operation has not completed it will return an error.
  1075  	Result func(CassandraResourcesClient) (autorest.Response, error)
  1076  }
  1077  
  1078  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1079  func (future *CassandraResourcesDeleteCassandraTableFuture) UnmarshalJSON(body []byte) error {
  1080  	var azFuture azure.Future
  1081  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1082  		return err
  1083  	}
  1084  	future.FutureAPI = &azFuture
  1085  	future.Result = future.result
  1086  	return nil
  1087  }
  1088  
  1089  // result is the default implementation for CassandraResourcesDeleteCassandraTableFuture.Result.
  1090  func (future *CassandraResourcesDeleteCassandraTableFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
  1091  	var done bool
  1092  	done, err = future.DoneWithContext(context.Background(), client)
  1093  	if err != nil {
  1094  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraTableFuture", "Result", future.Response(), "Polling failure")
  1095  		return
  1096  	}
  1097  	if !done {
  1098  		ar.Response = future.Response()
  1099  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraTableFuture")
  1100  		return
  1101  	}
  1102  	ar.Response = future.Response()
  1103  	return
  1104  }
  1105  
  1106  // CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture an abstraction for monitoring and retrieving
  1107  // the results of a long-running operation.
  1108  type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture struct {
  1109  	azure.FutureAPI
  1110  	// Result returns the result of the asynchronous operation.
  1111  	// If the operation has not completed it will return an error.
  1112  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1113  }
  1114  
  1115  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1116  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1117  	var azFuture azure.Future
  1118  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1119  		return err
  1120  	}
  1121  	future.FutureAPI = &azFuture
  1122  	future.Result = future.result
  1123  	return nil
  1124  }
  1125  
  1126  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture.Result.
  1127  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1128  	var done bool
  1129  	done, err = future.DoneWithContext(context.Background(), client)
  1130  	if err != nil {
  1131  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1132  		return
  1133  	}
  1134  	if !done {
  1135  		tsgr.Response.Response = future.Response()
  1136  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture")
  1137  		return
  1138  	}
  1139  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1140  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1141  		tsgr, err = client.MigrateCassandraKeyspaceToAutoscaleResponder(tsgr.Response.Response)
  1142  		if err != nil {
  1143  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1144  		}
  1145  	}
  1146  	return
  1147  }
  1148  
  1149  // CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture an abstraction for monitoring and
  1150  // retrieving the results of a long-running operation.
  1151  type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture struct {
  1152  	azure.FutureAPI
  1153  	// Result returns the result of the asynchronous operation.
  1154  	// If the operation has not completed it will return an error.
  1155  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1156  }
  1157  
  1158  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1159  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1160  	var azFuture azure.Future
  1161  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1162  		return err
  1163  	}
  1164  	future.FutureAPI = &azFuture
  1165  	future.Result = future.result
  1166  	return nil
  1167  }
  1168  
  1169  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture.Result.
  1170  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1171  	var done bool
  1172  	done, err = future.DoneWithContext(context.Background(), client)
  1173  	if err != nil {
  1174  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1175  		return
  1176  	}
  1177  	if !done {
  1178  		tsgr.Response.Response = future.Response()
  1179  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture")
  1180  		return
  1181  	}
  1182  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1183  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1184  		tsgr, err = client.MigrateCassandraKeyspaceToManualThroughputResponder(tsgr.Response.Response)
  1185  		if err != nil {
  1186  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1187  		}
  1188  	}
  1189  	return
  1190  }
  1191  
  1192  // CassandraResourcesMigrateCassandraTableToAutoscaleFuture an abstraction for monitoring and retrieving
  1193  // the results of a long-running operation.
  1194  type CassandraResourcesMigrateCassandraTableToAutoscaleFuture struct {
  1195  	azure.FutureAPI
  1196  	// Result returns the result of the asynchronous operation.
  1197  	// If the operation has not completed it will return an error.
  1198  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1199  }
  1200  
  1201  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1202  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1203  	var azFuture azure.Future
  1204  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1205  		return err
  1206  	}
  1207  	future.FutureAPI = &azFuture
  1208  	future.Result = future.result
  1209  	return nil
  1210  }
  1211  
  1212  // result is the default implementation for CassandraResourcesMigrateCassandraTableToAutoscaleFuture.Result.
  1213  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1214  	var done bool
  1215  	done, err = future.DoneWithContext(context.Background(), client)
  1216  	if err != nil {
  1217  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1218  		return
  1219  	}
  1220  	if !done {
  1221  		tsgr.Response.Response = future.Response()
  1222  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture")
  1223  		return
  1224  	}
  1225  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1226  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1227  		tsgr, err = client.MigrateCassandraTableToAutoscaleResponder(tsgr.Response.Response)
  1228  		if err != nil {
  1229  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1230  		}
  1231  	}
  1232  	return
  1233  }
  1234  
  1235  // CassandraResourcesMigrateCassandraTableToManualThroughputFuture an abstraction for monitoring and
  1236  // retrieving the results of a long-running operation.
  1237  type CassandraResourcesMigrateCassandraTableToManualThroughputFuture struct {
  1238  	azure.FutureAPI
  1239  	// Result returns the result of the asynchronous operation.
  1240  	// If the operation has not completed it will return an error.
  1241  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1242  }
  1243  
  1244  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1245  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1246  	var azFuture azure.Future
  1247  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1248  		return err
  1249  	}
  1250  	future.FutureAPI = &azFuture
  1251  	future.Result = future.result
  1252  	return nil
  1253  }
  1254  
  1255  // result is the default implementation for CassandraResourcesMigrateCassandraTableToManualThroughputFuture.Result.
  1256  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1257  	var done bool
  1258  	done, err = future.DoneWithContext(context.Background(), client)
  1259  	if err != nil {
  1260  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1261  		return
  1262  	}
  1263  	if !done {
  1264  		tsgr.Response.Response = future.Response()
  1265  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture")
  1266  		return
  1267  	}
  1268  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1269  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1270  		tsgr, err = client.MigrateCassandraTableToManualThroughputResponder(tsgr.Response.Response)
  1271  		if err != nil {
  1272  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1273  		}
  1274  	}
  1275  	return
  1276  }
  1277  
  1278  // CassandraResourcesUpdateCassandraKeyspaceThroughputFuture an abstraction for monitoring and retrieving
  1279  // the results of a long-running operation.
  1280  type CassandraResourcesUpdateCassandraKeyspaceThroughputFuture struct {
  1281  	azure.FutureAPI
  1282  	// Result returns the result of the asynchronous operation.
  1283  	// If the operation has not completed it will return an error.
  1284  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1285  }
  1286  
  1287  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1288  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) UnmarshalJSON(body []byte) error {
  1289  	var azFuture azure.Future
  1290  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1291  		return err
  1292  	}
  1293  	future.FutureAPI = &azFuture
  1294  	future.Result = future.result
  1295  	return nil
  1296  }
  1297  
  1298  // result is the default implementation for CassandraResourcesUpdateCassandraKeyspaceThroughputFuture.Result.
  1299  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1300  	var done bool
  1301  	done, err = future.DoneWithContext(context.Background(), client)
  1302  	if err != nil {
  1303  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", future.Response(), "Polling failure")
  1304  		return
  1305  	}
  1306  	if !done {
  1307  		tsgr.Response.Response = future.Response()
  1308  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture")
  1309  		return
  1310  	}
  1311  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1312  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1313  		tsgr, err = client.UpdateCassandraKeyspaceThroughputResponder(tsgr.Response.Response)
  1314  		if err != nil {
  1315  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1316  		}
  1317  	}
  1318  	return
  1319  }
  1320  
  1321  // CassandraResourcesUpdateCassandraTableThroughputFuture an abstraction for monitoring and retrieving the
  1322  // results of a long-running operation.
  1323  type CassandraResourcesUpdateCassandraTableThroughputFuture struct {
  1324  	azure.FutureAPI
  1325  	// Result returns the result of the asynchronous operation.
  1326  	// If the operation has not completed it will return an error.
  1327  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1328  }
  1329  
  1330  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1331  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) UnmarshalJSON(body []byte) error {
  1332  	var azFuture azure.Future
  1333  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1334  		return err
  1335  	}
  1336  	future.FutureAPI = &azFuture
  1337  	future.Result = future.result
  1338  	return nil
  1339  }
  1340  
  1341  // result is the default implementation for CassandraResourcesUpdateCassandraTableThroughputFuture.Result.
  1342  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1343  	var done bool
  1344  	done, err = future.DoneWithContext(context.Background(), client)
  1345  	if err != nil {
  1346  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", future.Response(), "Polling failure")
  1347  		return
  1348  	}
  1349  	if !done {
  1350  		tsgr.Response.Response = future.Response()
  1351  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture")
  1352  		return
  1353  	}
  1354  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1355  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1356  		tsgr, err = client.UpdateCassandraTableThroughputResponder(tsgr.Response.Response)
  1357  		if err != nil {
  1358  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1359  		}
  1360  	}
  1361  	return
  1362  }
  1363  
  1364  // CassandraSchema cosmos DB Cassandra table schema
  1365  type CassandraSchema struct {
  1366  	// Columns - List of Cassandra table columns.
  1367  	Columns *[]Column `json:"columns,omitempty"`
  1368  	// PartitionKeys - List of partition key.
  1369  	PartitionKeys *[]CassandraPartitionKey `json:"partitionKeys,omitempty"`
  1370  	// ClusterKeys - List of cluster key.
  1371  	ClusterKeys *[]ClusterKey `json:"clusterKeys,omitempty"`
  1372  }
  1373  
  1374  // CassandraTableCreateUpdateParameters parameters to create and update Cosmos DB Cassandra table.
  1375  type CassandraTableCreateUpdateParameters struct {
  1376  	// CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
  1377  	*CassandraTableCreateUpdateProperties `json:"properties,omitempty"`
  1378  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1379  	ID *string `json:"id,omitempty"`
  1380  	// Name - READ-ONLY; The name of the ARM resource.
  1381  	Name *string `json:"name,omitempty"`
  1382  	// Type - READ-ONLY; The type of Azure resource.
  1383  	Type *string `json:"type,omitempty"`
  1384  	// Location - The location of the resource group to which the resource belongs.
  1385  	Location *string            `json:"location,omitempty"`
  1386  	Tags     map[string]*string `json:"tags"`
  1387  }
  1388  
  1389  // MarshalJSON is the custom marshaler for CassandraTableCreateUpdateParameters.
  1390  func (ctcup CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  1391  	objectMap := make(map[string]interface{})
  1392  	if ctcup.CassandraTableCreateUpdateProperties != nil {
  1393  		objectMap["properties"] = ctcup.CassandraTableCreateUpdateProperties
  1394  	}
  1395  	if ctcup.Location != nil {
  1396  		objectMap["location"] = ctcup.Location
  1397  	}
  1398  	if ctcup.Tags != nil {
  1399  		objectMap["tags"] = ctcup.Tags
  1400  	}
  1401  	return json.Marshal(objectMap)
  1402  }
  1403  
  1404  // UnmarshalJSON is the custom unmarshaler for CassandraTableCreateUpdateParameters struct.
  1405  func (ctcup *CassandraTableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  1406  	var m map[string]*json.RawMessage
  1407  	err := json.Unmarshal(body, &m)
  1408  	if err != nil {
  1409  		return err
  1410  	}
  1411  	for k, v := range m {
  1412  		switch k {
  1413  		case "properties":
  1414  			if v != nil {
  1415  				var cassandraTableCreateUpdateProperties CassandraTableCreateUpdateProperties
  1416  				err = json.Unmarshal(*v, &cassandraTableCreateUpdateProperties)
  1417  				if err != nil {
  1418  					return err
  1419  				}
  1420  				ctcup.CassandraTableCreateUpdateProperties = &cassandraTableCreateUpdateProperties
  1421  			}
  1422  		case "id":
  1423  			if v != nil {
  1424  				var ID string
  1425  				err = json.Unmarshal(*v, &ID)
  1426  				if err != nil {
  1427  					return err
  1428  				}
  1429  				ctcup.ID = &ID
  1430  			}
  1431  		case "name":
  1432  			if v != nil {
  1433  				var name string
  1434  				err = json.Unmarshal(*v, &name)
  1435  				if err != nil {
  1436  					return err
  1437  				}
  1438  				ctcup.Name = &name
  1439  			}
  1440  		case "type":
  1441  			if v != nil {
  1442  				var typeVar string
  1443  				err = json.Unmarshal(*v, &typeVar)
  1444  				if err != nil {
  1445  					return err
  1446  				}
  1447  				ctcup.Type = &typeVar
  1448  			}
  1449  		case "location":
  1450  			if v != nil {
  1451  				var location string
  1452  				err = json.Unmarshal(*v, &location)
  1453  				if err != nil {
  1454  					return err
  1455  				}
  1456  				ctcup.Location = &location
  1457  			}
  1458  		case "tags":
  1459  			if v != nil {
  1460  				var tags map[string]*string
  1461  				err = json.Unmarshal(*v, &tags)
  1462  				if err != nil {
  1463  					return err
  1464  				}
  1465  				ctcup.Tags = tags
  1466  			}
  1467  		}
  1468  	}
  1469  
  1470  	return nil
  1471  }
  1472  
  1473  // CassandraTableCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra table.
  1474  type CassandraTableCreateUpdateProperties struct {
  1475  	// Resource - The standard JSON format of a Cassandra table
  1476  	Resource *CassandraTableResource `json:"resource,omitempty"`
  1477  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  1478  	Options *CreateUpdateOptions `json:"options,omitempty"`
  1479  }
  1480  
  1481  // CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table
  1482  type CassandraTableGetProperties struct {
  1483  	Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"`
  1484  	Options  *CassandraTableGetPropertiesOptions  `json:"options,omitempty"`
  1485  }
  1486  
  1487  // CassandraTableGetPropertiesOptions ...
  1488  type CassandraTableGetPropertiesOptions struct {
  1489  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  1490  	Throughput *int32 `json:"throughput,omitempty"`
  1491  	// AutoscaleSettings - Specifies the Autoscale settings.
  1492  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1493  }
  1494  
  1495  // CassandraTableGetPropertiesResource ...
  1496  type CassandraTableGetPropertiesResource struct {
  1497  	// ID - Name of the Cosmos DB Cassandra table
  1498  	ID *string `json:"id,omitempty"`
  1499  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1500  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1501  	// Schema - Schema of the Cosmos DB Cassandra table
  1502  	Schema *CassandraSchema `json:"schema,omitempty"`
  1503  	// AnalyticalStorageTTL - Analytical TTL.
  1504  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1505  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  1506  	Rid *string `json:"_rid,omitempty"`
  1507  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  1508  	Ts *float64 `json:"_ts,omitempty"`
  1509  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  1510  	Etag *string `json:"_etag,omitempty"`
  1511  }
  1512  
  1513  // MarshalJSON is the custom marshaler for CassandraTableGetPropertiesResource.
  1514  func (ctgp CassandraTableGetPropertiesResource) MarshalJSON() ([]byte, error) {
  1515  	objectMap := make(map[string]interface{})
  1516  	if ctgp.ID != nil {
  1517  		objectMap["id"] = ctgp.ID
  1518  	}
  1519  	if ctgp.DefaultTTL != nil {
  1520  		objectMap["defaultTtl"] = ctgp.DefaultTTL
  1521  	}
  1522  	if ctgp.Schema != nil {
  1523  		objectMap["schema"] = ctgp.Schema
  1524  	}
  1525  	if ctgp.AnalyticalStorageTTL != nil {
  1526  		objectMap["analyticalStorageTtl"] = ctgp.AnalyticalStorageTTL
  1527  	}
  1528  	return json.Marshal(objectMap)
  1529  }
  1530  
  1531  // CassandraTableGetResults an Azure Cosmos DB Cassandra table.
  1532  type CassandraTableGetResults struct {
  1533  	autorest.Response `json:"-"`
  1534  	// CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table
  1535  	*CassandraTableGetProperties `json:"properties,omitempty"`
  1536  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1537  	ID *string `json:"id,omitempty"`
  1538  	// Name - READ-ONLY; The name of the ARM resource.
  1539  	Name *string `json:"name,omitempty"`
  1540  	// Type - READ-ONLY; The type of Azure resource.
  1541  	Type *string `json:"type,omitempty"`
  1542  	// Location - The location of the resource group to which the resource belongs.
  1543  	Location *string            `json:"location,omitempty"`
  1544  	Tags     map[string]*string `json:"tags"`
  1545  }
  1546  
  1547  // MarshalJSON is the custom marshaler for CassandraTableGetResults.
  1548  func (ctgr CassandraTableGetResults) MarshalJSON() ([]byte, error) {
  1549  	objectMap := make(map[string]interface{})
  1550  	if ctgr.CassandraTableGetProperties != nil {
  1551  		objectMap["properties"] = ctgr.CassandraTableGetProperties
  1552  	}
  1553  	if ctgr.Location != nil {
  1554  		objectMap["location"] = ctgr.Location
  1555  	}
  1556  	if ctgr.Tags != nil {
  1557  		objectMap["tags"] = ctgr.Tags
  1558  	}
  1559  	return json.Marshal(objectMap)
  1560  }
  1561  
  1562  // UnmarshalJSON is the custom unmarshaler for CassandraTableGetResults struct.
  1563  func (ctgr *CassandraTableGetResults) UnmarshalJSON(body []byte) error {
  1564  	var m map[string]*json.RawMessage
  1565  	err := json.Unmarshal(body, &m)
  1566  	if err != nil {
  1567  		return err
  1568  	}
  1569  	for k, v := range m {
  1570  		switch k {
  1571  		case "properties":
  1572  			if v != nil {
  1573  				var cassandraTableGetProperties CassandraTableGetProperties
  1574  				err = json.Unmarshal(*v, &cassandraTableGetProperties)
  1575  				if err != nil {
  1576  					return err
  1577  				}
  1578  				ctgr.CassandraTableGetProperties = &cassandraTableGetProperties
  1579  			}
  1580  		case "id":
  1581  			if v != nil {
  1582  				var ID string
  1583  				err = json.Unmarshal(*v, &ID)
  1584  				if err != nil {
  1585  					return err
  1586  				}
  1587  				ctgr.ID = &ID
  1588  			}
  1589  		case "name":
  1590  			if v != nil {
  1591  				var name string
  1592  				err = json.Unmarshal(*v, &name)
  1593  				if err != nil {
  1594  					return err
  1595  				}
  1596  				ctgr.Name = &name
  1597  			}
  1598  		case "type":
  1599  			if v != nil {
  1600  				var typeVar string
  1601  				err = json.Unmarshal(*v, &typeVar)
  1602  				if err != nil {
  1603  					return err
  1604  				}
  1605  				ctgr.Type = &typeVar
  1606  			}
  1607  		case "location":
  1608  			if v != nil {
  1609  				var location string
  1610  				err = json.Unmarshal(*v, &location)
  1611  				if err != nil {
  1612  					return err
  1613  				}
  1614  				ctgr.Location = &location
  1615  			}
  1616  		case "tags":
  1617  			if v != nil {
  1618  				var tags map[string]*string
  1619  				err = json.Unmarshal(*v, &tags)
  1620  				if err != nil {
  1621  					return err
  1622  				}
  1623  				ctgr.Tags = tags
  1624  			}
  1625  		}
  1626  	}
  1627  
  1628  	return nil
  1629  }
  1630  
  1631  // CassandraTableListResult the List operation response, that contains the Cassandra tables and their
  1632  // properties.
  1633  type CassandraTableListResult struct {
  1634  	autorest.Response `json:"-"`
  1635  	// Value - READ-ONLY; List of Cassandra tables and their properties.
  1636  	Value *[]CassandraTableGetResults `json:"value,omitempty"`
  1637  }
  1638  
  1639  // MarshalJSON is the custom marshaler for CassandraTableListResult.
  1640  func (ctlr CassandraTableListResult) MarshalJSON() ([]byte, error) {
  1641  	objectMap := make(map[string]interface{})
  1642  	return json.Marshal(objectMap)
  1643  }
  1644  
  1645  // CassandraTableResource cosmos DB Cassandra table resource object
  1646  type CassandraTableResource struct {
  1647  	// ID - Name of the Cosmos DB Cassandra table
  1648  	ID *string `json:"id,omitempty"`
  1649  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1650  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1651  	// Schema - Schema of the Cosmos DB Cassandra table
  1652  	Schema *CassandraSchema `json:"schema,omitempty"`
  1653  	// AnalyticalStorageTTL - Analytical TTL.
  1654  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1655  }
  1656  
  1657  // Certificate ...
  1658  type Certificate struct {
  1659  	// Pem - PEM formatted public key.
  1660  	Pem *string `json:"pem,omitempty"`
  1661  }
  1662  
  1663  // CloudError an error response from the service.
  1664  type CloudError struct {
  1665  	Error *ErrorResponse `json:"error,omitempty"`
  1666  }
  1667  
  1668  // ClusterKey cosmos DB Cassandra table cluster key
  1669  type ClusterKey struct {
  1670  	// Name - Name of the Cosmos DB Cassandra table cluster key
  1671  	Name *string `json:"name,omitempty"`
  1672  	// OrderBy - Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc"
  1673  	OrderBy *string `json:"orderBy,omitempty"`
  1674  }
  1675  
  1676  // ClusterResource representation of a managed Cassandra cluster.
  1677  type ClusterResource struct {
  1678  	autorest.Response `json:"-"`
  1679  	// Properties - Properties of a managed Cassandra cluster.
  1680  	Properties *ClusterResourceProperties `json:"properties,omitempty"`
  1681  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1682  	ID *string `json:"id,omitempty"`
  1683  	// Name - READ-ONLY; The name of the ARM resource.
  1684  	Name *string `json:"name,omitempty"`
  1685  	// Type - READ-ONLY; The type of Azure resource.
  1686  	Type *string `json:"type,omitempty"`
  1687  	// Location - The location of the resource group to which the resource belongs.
  1688  	Location *string                                 `json:"location,omitempty"`
  1689  	Tags     map[string]*string                      `json:"tags"`
  1690  	Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"`
  1691  }
  1692  
  1693  // MarshalJSON is the custom marshaler for ClusterResource.
  1694  func (cr ClusterResource) MarshalJSON() ([]byte, error) {
  1695  	objectMap := make(map[string]interface{})
  1696  	if cr.Properties != nil {
  1697  		objectMap["properties"] = cr.Properties
  1698  	}
  1699  	if cr.Location != nil {
  1700  		objectMap["location"] = cr.Location
  1701  	}
  1702  	if cr.Tags != nil {
  1703  		objectMap["tags"] = cr.Tags
  1704  	}
  1705  	if cr.Identity != nil {
  1706  		objectMap["identity"] = cr.Identity
  1707  	}
  1708  	return json.Marshal(objectMap)
  1709  }
  1710  
  1711  // ClusterResourceProperties properties of a managed Cassandra cluster.
  1712  type ClusterResourceProperties struct {
  1713  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  1714  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  1715  	// 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.
  1716  	RestoreFromBackupID *string `json:"restoreFromBackupId,omitempty"`
  1717  	// 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>'
  1718  	DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty"`
  1719  	// 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.
  1720  	CassandraVersion *string `json:"cassandraVersion,omitempty"`
  1721  	// 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.
  1722  	ClusterNameOverride *string `json:"clusterNameOverride,omitempty"`
  1723  	// 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'
  1724  	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
  1725  	// 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'.
  1726  	InitialCassandraAdminPassword *string `json:"initialCassandraAdminPassword,omitempty"`
  1727  	// PrometheusEndpoint - Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached.
  1728  	PrometheusEndpoint *SeedNode `json:"prometheusEndpoint,omitempty"`
  1729  	// 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.
  1730  	RepairEnabled *bool `json:"repairEnabled,omitempty"`
  1731  	// 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.
  1732  	ClientCertificates *[]Certificate `json:"clientCertificates,omitempty"`
  1733  	// 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.
  1734  	ExternalGossipCertificates *[]Certificate `json:"externalGossipCertificates,omitempty"`
  1735  	// 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.
  1736  	GossipCertificates *[]Certificate `json:"gossipCertificates,omitempty"`
  1737  	// 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.
  1738  	ExternalSeedNodes *[]SeedNode `json:"externalSeedNodes,omitempty"`
  1739  	// 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.
  1740  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  1741  	// HoursBetweenBackups - Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0.
  1742  	HoursBetweenBackups *int32 `json:"hoursBetweenBackups,omitempty"`
  1743  	// Deallocated - Whether the cluster and associated data centers has been deallocated.
  1744  	Deallocated *bool `json:"deallocated,omitempty"`
  1745  	// CassandraAuditLoggingEnabled - Whether Cassandra audit logging is enabled
  1746  	CassandraAuditLoggingEnabled *bool `json:"cassandraAuditLoggingEnabled,omitempty"`
  1747  }
  1748  
  1749  // MarshalJSON is the custom marshaler for ClusterResourceProperties.
  1750  func (cr ClusterResourceProperties) MarshalJSON() ([]byte, error) {
  1751  	objectMap := make(map[string]interface{})
  1752  	if cr.ProvisioningState != "" {
  1753  		objectMap["provisioningState"] = cr.ProvisioningState
  1754  	}
  1755  	if cr.RestoreFromBackupID != nil {
  1756  		objectMap["restoreFromBackupId"] = cr.RestoreFromBackupID
  1757  	}
  1758  	if cr.DelegatedManagementSubnetID != nil {
  1759  		objectMap["delegatedManagementSubnetId"] = cr.DelegatedManagementSubnetID
  1760  	}
  1761  	if cr.CassandraVersion != nil {
  1762  		objectMap["cassandraVersion"] = cr.CassandraVersion
  1763  	}
  1764  	if cr.ClusterNameOverride != nil {
  1765  		objectMap["clusterNameOverride"] = cr.ClusterNameOverride
  1766  	}
  1767  	if cr.AuthenticationMethod != "" {
  1768  		objectMap["authenticationMethod"] = cr.AuthenticationMethod
  1769  	}
  1770  	if cr.InitialCassandraAdminPassword != nil {
  1771  		objectMap["initialCassandraAdminPassword"] = cr.InitialCassandraAdminPassword
  1772  	}
  1773  	if cr.PrometheusEndpoint != nil {
  1774  		objectMap["prometheusEndpoint"] = cr.PrometheusEndpoint
  1775  	}
  1776  	if cr.RepairEnabled != nil {
  1777  		objectMap["repairEnabled"] = cr.RepairEnabled
  1778  	}
  1779  	if cr.ClientCertificates != nil {
  1780  		objectMap["clientCertificates"] = cr.ClientCertificates
  1781  	}
  1782  	if cr.ExternalGossipCertificates != nil {
  1783  		objectMap["externalGossipCertificates"] = cr.ExternalGossipCertificates
  1784  	}
  1785  	if cr.ExternalSeedNodes != nil {
  1786  		objectMap["externalSeedNodes"] = cr.ExternalSeedNodes
  1787  	}
  1788  	if cr.HoursBetweenBackups != nil {
  1789  		objectMap["hoursBetweenBackups"] = cr.HoursBetweenBackups
  1790  	}
  1791  	if cr.Deallocated != nil {
  1792  		objectMap["deallocated"] = cr.Deallocated
  1793  	}
  1794  	if cr.CassandraAuditLoggingEnabled != nil {
  1795  		objectMap["cassandraAuditLoggingEnabled"] = cr.CassandraAuditLoggingEnabled
  1796  	}
  1797  	return json.Marshal(objectMap)
  1798  }
  1799  
  1800  // Column cosmos DB Cassandra table column
  1801  type Column struct {
  1802  	// Name - Name of the Cosmos DB Cassandra table column
  1803  	Name *string `json:"name,omitempty"`
  1804  	// Type - Type of the Cosmos DB Cassandra table column
  1805  	Type *string `json:"type,omitempty"`
  1806  }
  1807  
  1808  // CommandOutput response of /command api
  1809  type CommandOutput struct {
  1810  	autorest.Response `json:"-"`
  1811  	// CommandOutput - Output of the command.
  1812  	CommandOutput *string `json:"commandOutput,omitempty"`
  1813  }
  1814  
  1815  // CommandPostBody specification of which command to run where
  1816  type CommandPostBody struct {
  1817  	// Command - The command which should be run
  1818  	Command *string `json:"command,omitempty"`
  1819  	// Arguments - The arguments for the command to be run
  1820  	Arguments map[string]*string `json:"arguments"`
  1821  	// Host - IP address of the cassandra host to run the command on
  1822  	Host *string `json:"host,omitempty"`
  1823  	// CassandraStopStart - If true, stops cassandra before executing the command and then start it again
  1824  	CassandraStopStart *bool `json:"cassandra-stop-start,omitempty"`
  1825  	// Readwrite - If true, allows the command to *write* to the cassandra directory, otherwise read-only.
  1826  	Readwrite *bool `json:"readwrite,omitempty"`
  1827  }
  1828  
  1829  // MarshalJSON is the custom marshaler for CommandPostBody.
  1830  func (cpb CommandPostBody) MarshalJSON() ([]byte, error) {
  1831  	objectMap := make(map[string]interface{})
  1832  	if cpb.Command != nil {
  1833  		objectMap["command"] = cpb.Command
  1834  	}
  1835  	if cpb.Arguments != nil {
  1836  		objectMap["arguments"] = cpb.Arguments
  1837  	}
  1838  	if cpb.Host != nil {
  1839  		objectMap["host"] = cpb.Host
  1840  	}
  1841  	if cpb.CassandraStopStart != nil {
  1842  		objectMap["cassandra-stop-start"] = cpb.CassandraStopStart
  1843  	}
  1844  	if cpb.Readwrite != nil {
  1845  		objectMap["readwrite"] = cpb.Readwrite
  1846  	}
  1847  	return json.Marshal(objectMap)
  1848  }
  1849  
  1850  // CompositePath ...
  1851  type CompositePath struct {
  1852  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  1853  	Path *string `json:"path,omitempty"`
  1854  	// Order - Sort order for composite paths. Possible values include: 'Ascending', 'Descending'
  1855  	Order CompositePathSortOrder `json:"order,omitempty"`
  1856  }
  1857  
  1858  // ConflictResolutionPolicy the conflict resolution policy for the container.
  1859  type ConflictResolutionPolicy struct {
  1860  	// Mode - Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom'
  1861  	Mode ConflictResolutionMode `json:"mode,omitempty"`
  1862  	// ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode.
  1863  	ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"`
  1864  	// ConflictResolutionProcedure - The procedure to resolve conflicts in the case of custom mode.
  1865  	ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"`
  1866  }
  1867  
  1868  // ConnectionError ...
  1869  type ConnectionError struct {
  1870  	// ConnectionState - The kind of connection error that occurred. Possible values include: 'Unknown', 'OK', 'OperatorToDataCenterNetworkError', 'DatacenterToDatacenterNetworkError', 'InternalOperatorToDataCenterCertificateError', 'InternalError'
  1871  	ConnectionState ConnectionState `json:"connectionState,omitempty"`
  1872  	// IPFrom - The IP of host that originated the failed connection.
  1873  	IPFrom *string `json:"iPFrom,omitempty"`
  1874  	// IPTo - The IP that the connection attempted to reach.
  1875  	IPTo *string `json:"iPTo,omitempty"`
  1876  	// Port - The TCP port the connection was attempted on.
  1877  	Port *int32 `json:"port,omitempty"`
  1878  	// Exception - Detailed error message about the failed connection.
  1879  	Exception *string `json:"exception,omitempty"`
  1880  }
  1881  
  1882  // ConsistencyPolicy the consistency policy for the Cosmos DB database account.
  1883  type ConsistencyPolicy struct {
  1884  	// DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix'
  1885  	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
  1886  	// 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'.
  1887  	MaxStalenessPrefix *int64 `json:"maxStalenessPrefix,omitempty"`
  1888  	// 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'.
  1889  	MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"`
  1890  }
  1891  
  1892  // ContainerPartitionKey the configuration of the partition key to be used for partitioning data into
  1893  // multiple partitions
  1894  type ContainerPartitionKey struct {
  1895  	// Paths - List of paths using which data within the container can be partitioned
  1896  	Paths *[]string `json:"paths,omitempty"`
  1897  	// 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'
  1898  	Kind PartitionKind `json:"kind,omitempty"`
  1899  	// Version - Indicates the version of the partition key definition
  1900  	Version *int32 `json:"version,omitempty"`
  1901  	// SystemKey - READ-ONLY; Indicates if the container is using a system generated partition key
  1902  	SystemKey *bool `json:"systemKey,omitempty"`
  1903  }
  1904  
  1905  // MarshalJSON is the custom marshaler for ContainerPartitionKey.
  1906  func (cpk ContainerPartitionKey) MarshalJSON() ([]byte, error) {
  1907  	objectMap := make(map[string]interface{})
  1908  	if cpk.Paths != nil {
  1909  		objectMap["paths"] = cpk.Paths
  1910  	}
  1911  	if cpk.Kind != "" {
  1912  		objectMap["kind"] = cpk.Kind
  1913  	}
  1914  	if cpk.Version != nil {
  1915  		objectMap["version"] = cpk.Version
  1916  	}
  1917  	return json.Marshal(objectMap)
  1918  }
  1919  
  1920  // ContinuousBackupInformation information about the status of continuous backups.
  1921  type ContinuousBackupInformation struct {
  1922  	// LatestRestorableTimestamp - The latest restorable timestamp for a resource.
  1923  	LatestRestorableTimestamp *string `json:"latestRestorableTimestamp,omitempty"`
  1924  }
  1925  
  1926  // ContinuousBackupRestoreLocation properties of the regional restorable account.
  1927  type ContinuousBackupRestoreLocation struct {
  1928  	// Location - The name of the continuous backup restore location.
  1929  	Location *string `json:"location,omitempty"`
  1930  }
  1931  
  1932  // ContinuousModeBackupPolicy the object representing continuous mode backup policy.
  1933  type ContinuousModeBackupPolicy struct {
  1934  	// MigrationState - The object representing the state of the migration between the backup policies.
  1935  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
  1936  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  1937  	Type Type `json:"type,omitempty"`
  1938  }
  1939  
  1940  // MarshalJSON is the custom marshaler for ContinuousModeBackupPolicy.
  1941  func (cmbp ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) {
  1942  	cmbp.Type = TypeContinuous
  1943  	objectMap := make(map[string]interface{})
  1944  	if cmbp.MigrationState != nil {
  1945  		objectMap["migrationState"] = cmbp.MigrationState
  1946  	}
  1947  	if cmbp.Type != "" {
  1948  		objectMap["type"] = cmbp.Type
  1949  	}
  1950  	return json.Marshal(objectMap)
  1951  }
  1952  
  1953  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1954  func (cmbp ContinuousModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  1955  	return nil, false
  1956  }
  1957  
  1958  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1959  func (cmbp ContinuousModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  1960  	return &cmbp, true
  1961  }
  1962  
  1963  // AsBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1964  func (cmbp ContinuousModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  1965  	return nil, false
  1966  }
  1967  
  1968  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1969  func (cmbp ContinuousModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  1970  	return &cmbp, true
  1971  }
  1972  
  1973  // CorsPolicy the CORS policy for the Cosmos DB database account.
  1974  type CorsPolicy struct {
  1975  	// AllowedOrigins - The origin domains that are permitted to make a request against the service via CORS.
  1976  	AllowedOrigins *string `json:"allowedOrigins,omitempty"`
  1977  	// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request.
  1978  	AllowedMethods *string `json:"allowedMethods,omitempty"`
  1979  	// AllowedHeaders - The request headers that the origin domain may specify on the CORS request.
  1980  	AllowedHeaders *string `json:"allowedHeaders,omitempty"`
  1981  	// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
  1982  	ExposedHeaders *string `json:"exposedHeaders,omitempty"`
  1983  	// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
  1984  	MaxAgeInSeconds *int64 `json:"maxAgeInSeconds,omitempty"`
  1985  }
  1986  
  1987  // CreateUpdateOptions createUpdateOptions are a list of key-value pairs that describe the resource.
  1988  // Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput"
  1989  type CreateUpdateOptions struct {
  1990  	// Throughput - Request Units per second. For example, "throughput": 10000.
  1991  	Throughput *int32 `json:"throughput,omitempty"`
  1992  	// AutoscaleSettings - Specifies the Autoscale settings.
  1993  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1994  }
  1995  
  1996  // DatabaseAccountConnectionString connection string for the Cosmos DB account
  1997  type DatabaseAccountConnectionString struct {
  1998  	// ConnectionString - READ-ONLY; Value of the connection string
  1999  	ConnectionString *string `json:"connectionString,omitempty"`
  2000  	// Description - READ-ONLY; Description of the connection string
  2001  	Description *string `json:"description,omitempty"`
  2002  }
  2003  
  2004  // MarshalJSON is the custom marshaler for DatabaseAccountConnectionString.
  2005  func (dacs DatabaseAccountConnectionString) MarshalJSON() ([]byte, error) {
  2006  	objectMap := make(map[string]interface{})
  2007  	return json.Marshal(objectMap)
  2008  }
  2009  
  2010  // DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts.
  2011  type DatabaseAccountCreateUpdateParameters struct {
  2012  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  2013  	Kind                                   DatabaseAccountKind     `json:"kind,omitempty"`
  2014  	Identity                               *ManagedServiceIdentity `json:"identity,omitempty"`
  2015  	*DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
  2016  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  2017  	ID *string `json:"id,omitempty"`
  2018  	// Name - READ-ONLY; The name of the ARM resource.
  2019  	Name *string `json:"name,omitempty"`
  2020  	// Type - READ-ONLY; The type of Azure resource.
  2021  	Type *string `json:"type,omitempty"`
  2022  	// Location - The location of the resource group to which the resource belongs.
  2023  	Location *string            `json:"location,omitempty"`
  2024  	Tags     map[string]*string `json:"tags"`
  2025  }
  2026  
  2027  // MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateParameters.
  2028  func (dacup DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  2029  	objectMap := make(map[string]interface{})
  2030  	if dacup.Kind != "" {
  2031  		objectMap["kind"] = dacup.Kind
  2032  	}
  2033  	if dacup.Identity != nil {
  2034  		objectMap["identity"] = dacup.Identity
  2035  	}
  2036  	if dacup.DatabaseAccountCreateUpdateProperties != nil {
  2037  		objectMap["properties"] = dacup.DatabaseAccountCreateUpdateProperties
  2038  	}
  2039  	if dacup.Location != nil {
  2040  		objectMap["location"] = dacup.Location
  2041  	}
  2042  	if dacup.Tags != nil {
  2043  		objectMap["tags"] = dacup.Tags
  2044  	}
  2045  	return json.Marshal(objectMap)
  2046  }
  2047  
  2048  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct.
  2049  func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  2050  	var m map[string]*json.RawMessage
  2051  	err := json.Unmarshal(body, &m)
  2052  	if err != nil {
  2053  		return err
  2054  	}
  2055  	for k, v := range m {
  2056  		switch k {
  2057  		case "kind":
  2058  			if v != nil {
  2059  				var kind DatabaseAccountKind
  2060  				err = json.Unmarshal(*v, &kind)
  2061  				if err != nil {
  2062  					return err
  2063  				}
  2064  				dacup.Kind = kind
  2065  			}
  2066  		case "identity":
  2067  			if v != nil {
  2068  				var identity ManagedServiceIdentity
  2069  				err = json.Unmarshal(*v, &identity)
  2070  				if err != nil {
  2071  					return err
  2072  				}
  2073  				dacup.Identity = &identity
  2074  			}
  2075  		case "properties":
  2076  			if v != nil {
  2077  				var databaseAccountCreateUpdateProperties DatabaseAccountCreateUpdateProperties
  2078  				err = json.Unmarshal(*v, &databaseAccountCreateUpdateProperties)
  2079  				if err != nil {
  2080  					return err
  2081  				}
  2082  				dacup.DatabaseAccountCreateUpdateProperties = &databaseAccountCreateUpdateProperties
  2083  			}
  2084  		case "id":
  2085  			if v != nil {
  2086  				var ID string
  2087  				err = json.Unmarshal(*v, &ID)
  2088  				if err != nil {
  2089  					return err
  2090  				}
  2091  				dacup.ID = &ID
  2092  			}
  2093  		case "name":
  2094  			if v != nil {
  2095  				var name string
  2096  				err = json.Unmarshal(*v, &name)
  2097  				if err != nil {
  2098  					return err
  2099  				}
  2100  				dacup.Name = &name
  2101  			}
  2102  		case "type":
  2103  			if v != nil {
  2104  				var typeVar string
  2105  				err = json.Unmarshal(*v, &typeVar)
  2106  				if err != nil {
  2107  					return err
  2108  				}
  2109  				dacup.Type = &typeVar
  2110  			}
  2111  		case "location":
  2112  			if v != nil {
  2113  				var location string
  2114  				err = json.Unmarshal(*v, &location)
  2115  				if err != nil {
  2116  					return err
  2117  				}
  2118  				dacup.Location = &location
  2119  			}
  2120  		case "tags":
  2121  			if v != nil {
  2122  				var tags map[string]*string
  2123  				err = json.Unmarshal(*v, &tags)
  2124  				if err != nil {
  2125  					return err
  2126  				}
  2127  				dacup.Tags = tags
  2128  			}
  2129  		}
  2130  	}
  2131  
  2132  	return nil
  2133  }
  2134  
  2135  // DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.
  2136  type DatabaseAccountCreateUpdateProperties struct {
  2137  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  2138  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2139  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  2140  	Locations *[]Location `json:"locations,omitempty"`
  2141  	// DatabaseAccountOfferType - The offer type for the database
  2142  	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
  2143  	// IPRules - List of IpRules.
  2144  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2145  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2146  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2147  	// 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.
  2148  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2149  	// Capabilities - List of Cosmos DB capabilities for the account
  2150  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2151  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2152  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2153  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2154  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2155  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2156  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2157  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
  2158  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2159  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2160  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2161  	// KeyVaultKeyURI - The URI of the key vault
  2162  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2163  	// 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.
  2164  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2165  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled'
  2166  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2167  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2168  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2169  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  2170  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2171  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2172  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2173  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  2174  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  2175  	// CreateMode - Enum to indicate the mode of account creation. Possible values include: 'Default', 'Restore'
  2176  	CreateMode CreateMode `json:"createMode,omitempty"`
  2177  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2178  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2179  	// Cors - The CORS policy for the Cosmos DB database account.
  2180  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2181  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2182  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2183  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2184  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2185  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  2186  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  2187  	// RestoreParameters - Parameters to indicate the information about the restore.
  2188  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  2189  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  2190  	Capacity *Capacity `json:"capacity,omitempty"`
  2191  	// KeysMetadata - This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account.
  2192  	KeysMetadata *DatabaseAccountKeysMetadata `json:"keysMetadata,omitempty"`
  2193  	// EnablePartitionMerge - Flag to indicate enabling/disabling of Partition Merge feature on the account
  2194  	EnablePartitionMerge *bool `json:"enablePartitionMerge,omitempty"`
  2195  }
  2196  
  2197  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateProperties struct.
  2198  func (dacup *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(body []byte) error {
  2199  	var m map[string]*json.RawMessage
  2200  	err := json.Unmarshal(body, &m)
  2201  	if err != nil {
  2202  		return err
  2203  	}
  2204  	for k, v := range m {
  2205  		switch k {
  2206  		case "consistencyPolicy":
  2207  			if v != nil {
  2208  				var consistencyPolicy ConsistencyPolicy
  2209  				err = json.Unmarshal(*v, &consistencyPolicy)
  2210  				if err != nil {
  2211  					return err
  2212  				}
  2213  				dacup.ConsistencyPolicy = &consistencyPolicy
  2214  			}
  2215  		case "locations":
  2216  			if v != nil {
  2217  				var locations []Location
  2218  				err = json.Unmarshal(*v, &locations)
  2219  				if err != nil {
  2220  					return err
  2221  				}
  2222  				dacup.Locations = &locations
  2223  			}
  2224  		case "databaseAccountOfferType":
  2225  			if v != nil {
  2226  				var databaseAccountOfferType string
  2227  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2228  				if err != nil {
  2229  					return err
  2230  				}
  2231  				dacup.DatabaseAccountOfferType = &databaseAccountOfferType
  2232  			}
  2233  		case "ipRules":
  2234  			if v != nil {
  2235  				var IPRules []IPAddressOrRange
  2236  				err = json.Unmarshal(*v, &IPRules)
  2237  				if err != nil {
  2238  					return err
  2239  				}
  2240  				dacup.IPRules = &IPRules
  2241  			}
  2242  		case "isVirtualNetworkFilterEnabled":
  2243  			if v != nil {
  2244  				var isVirtualNetworkFilterEnabled bool
  2245  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2246  				if err != nil {
  2247  					return err
  2248  				}
  2249  				dacup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2250  			}
  2251  		case "enableAutomaticFailover":
  2252  			if v != nil {
  2253  				var enableAutomaticFailover bool
  2254  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2255  				if err != nil {
  2256  					return err
  2257  				}
  2258  				dacup.EnableAutomaticFailover = &enableAutomaticFailover
  2259  			}
  2260  		case "capabilities":
  2261  			if v != nil {
  2262  				var capabilities []Capability
  2263  				err = json.Unmarshal(*v, &capabilities)
  2264  				if err != nil {
  2265  					return err
  2266  				}
  2267  				dacup.Capabilities = &capabilities
  2268  			}
  2269  		case "virtualNetworkRules":
  2270  			if v != nil {
  2271  				var virtualNetworkRules []VirtualNetworkRule
  2272  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2273  				if err != nil {
  2274  					return err
  2275  				}
  2276  				dacup.VirtualNetworkRules = &virtualNetworkRules
  2277  			}
  2278  		case "enableMultipleWriteLocations":
  2279  			if v != nil {
  2280  				var enableMultipleWriteLocations bool
  2281  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2282  				if err != nil {
  2283  					return err
  2284  				}
  2285  				dacup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2286  			}
  2287  		case "enableCassandraConnector":
  2288  			if v != nil {
  2289  				var enableCassandraConnector bool
  2290  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2291  				if err != nil {
  2292  					return err
  2293  				}
  2294  				dacup.EnableCassandraConnector = &enableCassandraConnector
  2295  			}
  2296  		case "connectorOffer":
  2297  			if v != nil {
  2298  				var connectorOffer ConnectorOffer
  2299  				err = json.Unmarshal(*v, &connectorOffer)
  2300  				if err != nil {
  2301  					return err
  2302  				}
  2303  				dacup.ConnectorOffer = connectorOffer
  2304  			}
  2305  		case "disableKeyBasedMetadataWriteAccess":
  2306  			if v != nil {
  2307  				var disableKeyBasedMetadataWriteAccess bool
  2308  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2309  				if err != nil {
  2310  					return err
  2311  				}
  2312  				dacup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2313  			}
  2314  		case "keyVaultKeyUri":
  2315  			if v != nil {
  2316  				var keyVaultKeyURI string
  2317  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2318  				if err != nil {
  2319  					return err
  2320  				}
  2321  				dacup.KeyVaultKeyURI = &keyVaultKeyURI
  2322  			}
  2323  		case "defaultIdentity":
  2324  			if v != nil {
  2325  				var defaultIdentity string
  2326  				err = json.Unmarshal(*v, &defaultIdentity)
  2327  				if err != nil {
  2328  					return err
  2329  				}
  2330  				dacup.DefaultIdentity = &defaultIdentity
  2331  			}
  2332  		case "publicNetworkAccess":
  2333  			if v != nil {
  2334  				var publicNetworkAccess PublicNetworkAccess
  2335  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2336  				if err != nil {
  2337  					return err
  2338  				}
  2339  				dacup.PublicNetworkAccess = publicNetworkAccess
  2340  			}
  2341  		case "enableFreeTier":
  2342  			if v != nil {
  2343  				var enableFreeTier bool
  2344  				err = json.Unmarshal(*v, &enableFreeTier)
  2345  				if err != nil {
  2346  					return err
  2347  				}
  2348  				dacup.EnableFreeTier = &enableFreeTier
  2349  			}
  2350  		case "apiProperties":
  2351  			if v != nil {
  2352  				var APIProperties APIProperties
  2353  				err = json.Unmarshal(*v, &APIProperties)
  2354  				if err != nil {
  2355  					return err
  2356  				}
  2357  				dacup.APIProperties = &APIProperties
  2358  			}
  2359  		case "enableAnalyticalStorage":
  2360  			if v != nil {
  2361  				var enableAnalyticalStorage bool
  2362  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2363  				if err != nil {
  2364  					return err
  2365  				}
  2366  				dacup.EnableAnalyticalStorage = &enableAnalyticalStorage
  2367  			}
  2368  		case "analyticalStorageConfiguration":
  2369  			if v != nil {
  2370  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  2371  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  2372  				if err != nil {
  2373  					return err
  2374  				}
  2375  				dacup.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  2376  			}
  2377  		case "createMode":
  2378  			if v != nil {
  2379  				var createMode CreateMode
  2380  				err = json.Unmarshal(*v, &createMode)
  2381  				if err != nil {
  2382  					return err
  2383  				}
  2384  				dacup.CreateMode = createMode
  2385  			}
  2386  		case "backupPolicy":
  2387  			if v != nil {
  2388  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2389  				if err != nil {
  2390  					return err
  2391  				}
  2392  				dacup.BackupPolicy = backupPolicy
  2393  			}
  2394  		case "cors":
  2395  			if v != nil {
  2396  				var cors []CorsPolicy
  2397  				err = json.Unmarshal(*v, &cors)
  2398  				if err != nil {
  2399  					return err
  2400  				}
  2401  				dacup.Cors = &cors
  2402  			}
  2403  		case "networkAclBypass":
  2404  			if v != nil {
  2405  				var networkACLBypass NetworkACLBypass
  2406  				err = json.Unmarshal(*v, &networkACLBypass)
  2407  				if err != nil {
  2408  					return err
  2409  				}
  2410  				dacup.NetworkACLBypass = networkACLBypass
  2411  			}
  2412  		case "networkAclBypassResourceIds":
  2413  			if v != nil {
  2414  				var networkACLBypassResourceIds []string
  2415  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2416  				if err != nil {
  2417  					return err
  2418  				}
  2419  				dacup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2420  			}
  2421  		case "disableLocalAuth":
  2422  			if v != nil {
  2423  				var disableLocalAuth bool
  2424  				err = json.Unmarshal(*v, &disableLocalAuth)
  2425  				if err != nil {
  2426  					return err
  2427  				}
  2428  				dacup.DisableLocalAuth = &disableLocalAuth
  2429  			}
  2430  		case "restoreParameters":
  2431  			if v != nil {
  2432  				var restoreParameters RestoreParameters
  2433  				err = json.Unmarshal(*v, &restoreParameters)
  2434  				if err != nil {
  2435  					return err
  2436  				}
  2437  				dacup.RestoreParameters = &restoreParameters
  2438  			}
  2439  		case "capacity":
  2440  			if v != nil {
  2441  				var capacity Capacity
  2442  				err = json.Unmarshal(*v, &capacity)
  2443  				if err != nil {
  2444  					return err
  2445  				}
  2446  				dacup.Capacity = &capacity
  2447  			}
  2448  		case "keysMetadata":
  2449  			if v != nil {
  2450  				var keysMetadata DatabaseAccountKeysMetadata
  2451  				err = json.Unmarshal(*v, &keysMetadata)
  2452  				if err != nil {
  2453  					return err
  2454  				}
  2455  				dacup.KeysMetadata = &keysMetadata
  2456  			}
  2457  		case "enablePartitionMerge":
  2458  			if v != nil {
  2459  				var enablePartitionMerge bool
  2460  				err = json.Unmarshal(*v, &enablePartitionMerge)
  2461  				if err != nil {
  2462  					return err
  2463  				}
  2464  				dacup.EnablePartitionMerge = &enablePartitionMerge
  2465  			}
  2466  		}
  2467  	}
  2468  
  2469  	return nil
  2470  }
  2471  
  2472  // DatabaseAccountGetProperties properties for the database account.
  2473  type DatabaseAccountGetProperties struct {
  2474  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2475  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the Cosmos DB database account.
  2476  	DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
  2477  	// DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'Standard'
  2478  	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
  2479  	// IPRules - List of IpRules.
  2480  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2481  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2482  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2483  	// 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.
  2484  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2485  	// ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
  2486  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2487  	// Capabilities - List of Cosmos DB capabilities for the account
  2488  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2489  	// WriteLocations - READ-ONLY; An array that contains the write location for the Cosmos DB account.
  2490  	WriteLocations *[]Location `json:"writeLocations,omitempty"`
  2491  	// ReadLocations - READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account.
  2492  	ReadLocations *[]Location `json:"readLocations,omitempty"`
  2493  	// Locations - READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account.
  2494  	Locations *[]Location `json:"locations,omitempty"`
  2495  	// FailoverPolicies - READ-ONLY; An array that contains the regions ordered by their failover priorities.
  2496  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  2497  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2498  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2499  	// PrivateEndpointConnections - READ-ONLY; List of Private Endpoint Connections configured for the Cosmos DB account.
  2500  	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
  2501  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2502  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2503  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2504  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2505  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
  2506  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2507  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2508  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2509  	// KeyVaultKeyURI - The URI of the key vault
  2510  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2511  	// 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.
  2512  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2513  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled'
  2514  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2515  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2516  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2517  	// APIProperties - API specific properties.
  2518  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2519  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2520  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2521  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  2522  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  2523  	// InstanceID - READ-ONLY; A unique identifier assigned to the database account
  2524  	InstanceID *string `json:"instanceId,omitempty"`
  2525  	// CreateMode - Enum to indicate the mode of account creation. Possible values include: 'Default', 'Restore'
  2526  	CreateMode CreateMode `json:"createMode,omitempty"`
  2527  	// RestoreParameters - Parameters to indicate the information about the restore.
  2528  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  2529  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2530  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2531  	// Cors - The CORS policy for the Cosmos DB database account.
  2532  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2533  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2534  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2535  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2536  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2537  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  2538  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  2539  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  2540  	Capacity *Capacity `json:"capacity,omitempty"`
  2541  	// KeysMetadata - The object that represents the metadata for the Account Keys of the Cosmos DB account.
  2542  	KeysMetadata *DatabaseAccountKeysMetadata `json:"keysMetadata,omitempty"`
  2543  	// EnablePartitionMerge - Flag to indicate enabling/disabling of Partition Merge feature on the account
  2544  	EnablePartitionMerge *bool `json:"enablePartitionMerge,omitempty"`
  2545  }
  2546  
  2547  // MarshalJSON is the custom marshaler for DatabaseAccountGetProperties.
  2548  func (dagp DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) {
  2549  	objectMap := make(map[string]interface{})
  2550  	if dagp.ProvisioningState != nil {
  2551  		objectMap["provisioningState"] = dagp.ProvisioningState
  2552  	}
  2553  	if dagp.IPRules != nil {
  2554  		objectMap["ipRules"] = dagp.IPRules
  2555  	}
  2556  	if dagp.IsVirtualNetworkFilterEnabled != nil {
  2557  		objectMap["isVirtualNetworkFilterEnabled"] = dagp.IsVirtualNetworkFilterEnabled
  2558  	}
  2559  	if dagp.EnableAutomaticFailover != nil {
  2560  		objectMap["enableAutomaticFailover"] = dagp.EnableAutomaticFailover
  2561  	}
  2562  	if dagp.ConsistencyPolicy != nil {
  2563  		objectMap["consistencyPolicy"] = dagp.ConsistencyPolicy
  2564  	}
  2565  	if dagp.Capabilities != nil {
  2566  		objectMap["capabilities"] = dagp.Capabilities
  2567  	}
  2568  	if dagp.VirtualNetworkRules != nil {
  2569  		objectMap["virtualNetworkRules"] = dagp.VirtualNetworkRules
  2570  	}
  2571  	if dagp.EnableMultipleWriteLocations != nil {
  2572  		objectMap["enableMultipleWriteLocations"] = dagp.EnableMultipleWriteLocations
  2573  	}
  2574  	if dagp.EnableCassandraConnector != nil {
  2575  		objectMap["enableCassandraConnector"] = dagp.EnableCassandraConnector
  2576  	}
  2577  	if dagp.ConnectorOffer != "" {
  2578  		objectMap["connectorOffer"] = dagp.ConnectorOffer
  2579  	}
  2580  	if dagp.DisableKeyBasedMetadataWriteAccess != nil {
  2581  		objectMap["disableKeyBasedMetadataWriteAccess"] = dagp.DisableKeyBasedMetadataWriteAccess
  2582  	}
  2583  	if dagp.KeyVaultKeyURI != nil {
  2584  		objectMap["keyVaultKeyUri"] = dagp.KeyVaultKeyURI
  2585  	}
  2586  	if dagp.DefaultIdentity != nil {
  2587  		objectMap["defaultIdentity"] = dagp.DefaultIdentity
  2588  	}
  2589  	if dagp.PublicNetworkAccess != "" {
  2590  		objectMap["publicNetworkAccess"] = dagp.PublicNetworkAccess
  2591  	}
  2592  	if dagp.EnableFreeTier != nil {
  2593  		objectMap["enableFreeTier"] = dagp.EnableFreeTier
  2594  	}
  2595  	if dagp.APIProperties != nil {
  2596  		objectMap["apiProperties"] = dagp.APIProperties
  2597  	}
  2598  	if dagp.EnableAnalyticalStorage != nil {
  2599  		objectMap["enableAnalyticalStorage"] = dagp.EnableAnalyticalStorage
  2600  	}
  2601  	if dagp.AnalyticalStorageConfiguration != nil {
  2602  		objectMap["analyticalStorageConfiguration"] = dagp.AnalyticalStorageConfiguration
  2603  	}
  2604  	if dagp.CreateMode != "" {
  2605  		objectMap["createMode"] = dagp.CreateMode
  2606  	}
  2607  	if dagp.RestoreParameters != nil {
  2608  		objectMap["restoreParameters"] = dagp.RestoreParameters
  2609  	}
  2610  	objectMap["backupPolicy"] = dagp.BackupPolicy
  2611  	if dagp.Cors != nil {
  2612  		objectMap["cors"] = dagp.Cors
  2613  	}
  2614  	if dagp.NetworkACLBypass != "" {
  2615  		objectMap["networkAclBypass"] = dagp.NetworkACLBypass
  2616  	}
  2617  	if dagp.NetworkACLBypassResourceIds != nil {
  2618  		objectMap["networkAclBypassResourceIds"] = dagp.NetworkACLBypassResourceIds
  2619  	}
  2620  	if dagp.DisableLocalAuth != nil {
  2621  		objectMap["disableLocalAuth"] = dagp.DisableLocalAuth
  2622  	}
  2623  	if dagp.Capacity != nil {
  2624  		objectMap["capacity"] = dagp.Capacity
  2625  	}
  2626  	if dagp.KeysMetadata != nil {
  2627  		objectMap["keysMetadata"] = dagp.KeysMetadata
  2628  	}
  2629  	if dagp.EnablePartitionMerge != nil {
  2630  		objectMap["enablePartitionMerge"] = dagp.EnablePartitionMerge
  2631  	}
  2632  	return json.Marshal(objectMap)
  2633  }
  2634  
  2635  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetProperties struct.
  2636  func (dagp *DatabaseAccountGetProperties) UnmarshalJSON(body []byte) error {
  2637  	var m map[string]*json.RawMessage
  2638  	err := json.Unmarshal(body, &m)
  2639  	if err != nil {
  2640  		return err
  2641  	}
  2642  	for k, v := range m {
  2643  		switch k {
  2644  		case "provisioningState":
  2645  			if v != nil {
  2646  				var provisioningState string
  2647  				err = json.Unmarshal(*v, &provisioningState)
  2648  				if err != nil {
  2649  					return err
  2650  				}
  2651  				dagp.ProvisioningState = &provisioningState
  2652  			}
  2653  		case "documentEndpoint":
  2654  			if v != nil {
  2655  				var documentEndpoint string
  2656  				err = json.Unmarshal(*v, &documentEndpoint)
  2657  				if err != nil {
  2658  					return err
  2659  				}
  2660  				dagp.DocumentEndpoint = &documentEndpoint
  2661  			}
  2662  		case "databaseAccountOfferType":
  2663  			if v != nil {
  2664  				var databaseAccountOfferType DatabaseAccountOfferType
  2665  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2666  				if err != nil {
  2667  					return err
  2668  				}
  2669  				dagp.DatabaseAccountOfferType = databaseAccountOfferType
  2670  			}
  2671  		case "ipRules":
  2672  			if v != nil {
  2673  				var IPRules []IPAddressOrRange
  2674  				err = json.Unmarshal(*v, &IPRules)
  2675  				if err != nil {
  2676  					return err
  2677  				}
  2678  				dagp.IPRules = &IPRules
  2679  			}
  2680  		case "isVirtualNetworkFilterEnabled":
  2681  			if v != nil {
  2682  				var isVirtualNetworkFilterEnabled bool
  2683  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2684  				if err != nil {
  2685  					return err
  2686  				}
  2687  				dagp.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2688  			}
  2689  		case "enableAutomaticFailover":
  2690  			if v != nil {
  2691  				var enableAutomaticFailover bool
  2692  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2693  				if err != nil {
  2694  					return err
  2695  				}
  2696  				dagp.EnableAutomaticFailover = &enableAutomaticFailover
  2697  			}
  2698  		case "consistencyPolicy":
  2699  			if v != nil {
  2700  				var consistencyPolicy ConsistencyPolicy
  2701  				err = json.Unmarshal(*v, &consistencyPolicy)
  2702  				if err != nil {
  2703  					return err
  2704  				}
  2705  				dagp.ConsistencyPolicy = &consistencyPolicy
  2706  			}
  2707  		case "capabilities":
  2708  			if v != nil {
  2709  				var capabilities []Capability
  2710  				err = json.Unmarshal(*v, &capabilities)
  2711  				if err != nil {
  2712  					return err
  2713  				}
  2714  				dagp.Capabilities = &capabilities
  2715  			}
  2716  		case "writeLocations":
  2717  			if v != nil {
  2718  				var writeLocations []Location
  2719  				err = json.Unmarshal(*v, &writeLocations)
  2720  				if err != nil {
  2721  					return err
  2722  				}
  2723  				dagp.WriteLocations = &writeLocations
  2724  			}
  2725  		case "readLocations":
  2726  			if v != nil {
  2727  				var readLocations []Location
  2728  				err = json.Unmarshal(*v, &readLocations)
  2729  				if err != nil {
  2730  					return err
  2731  				}
  2732  				dagp.ReadLocations = &readLocations
  2733  			}
  2734  		case "locations":
  2735  			if v != nil {
  2736  				var locations []Location
  2737  				err = json.Unmarshal(*v, &locations)
  2738  				if err != nil {
  2739  					return err
  2740  				}
  2741  				dagp.Locations = &locations
  2742  			}
  2743  		case "failoverPolicies":
  2744  			if v != nil {
  2745  				var failoverPolicies []FailoverPolicy
  2746  				err = json.Unmarshal(*v, &failoverPolicies)
  2747  				if err != nil {
  2748  					return err
  2749  				}
  2750  				dagp.FailoverPolicies = &failoverPolicies
  2751  			}
  2752  		case "virtualNetworkRules":
  2753  			if v != nil {
  2754  				var virtualNetworkRules []VirtualNetworkRule
  2755  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2756  				if err != nil {
  2757  					return err
  2758  				}
  2759  				dagp.VirtualNetworkRules = &virtualNetworkRules
  2760  			}
  2761  		case "privateEndpointConnections":
  2762  			if v != nil {
  2763  				var privateEndpointConnections []PrivateEndpointConnection
  2764  				err = json.Unmarshal(*v, &privateEndpointConnections)
  2765  				if err != nil {
  2766  					return err
  2767  				}
  2768  				dagp.PrivateEndpointConnections = &privateEndpointConnections
  2769  			}
  2770  		case "enableMultipleWriteLocations":
  2771  			if v != nil {
  2772  				var enableMultipleWriteLocations bool
  2773  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2774  				if err != nil {
  2775  					return err
  2776  				}
  2777  				dagp.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2778  			}
  2779  		case "enableCassandraConnector":
  2780  			if v != nil {
  2781  				var enableCassandraConnector bool
  2782  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2783  				if err != nil {
  2784  					return err
  2785  				}
  2786  				dagp.EnableCassandraConnector = &enableCassandraConnector
  2787  			}
  2788  		case "connectorOffer":
  2789  			if v != nil {
  2790  				var connectorOffer ConnectorOffer
  2791  				err = json.Unmarshal(*v, &connectorOffer)
  2792  				if err != nil {
  2793  					return err
  2794  				}
  2795  				dagp.ConnectorOffer = connectorOffer
  2796  			}
  2797  		case "disableKeyBasedMetadataWriteAccess":
  2798  			if v != nil {
  2799  				var disableKeyBasedMetadataWriteAccess bool
  2800  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2801  				if err != nil {
  2802  					return err
  2803  				}
  2804  				dagp.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2805  			}
  2806  		case "keyVaultKeyUri":
  2807  			if v != nil {
  2808  				var keyVaultKeyURI string
  2809  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2810  				if err != nil {
  2811  					return err
  2812  				}
  2813  				dagp.KeyVaultKeyURI = &keyVaultKeyURI
  2814  			}
  2815  		case "defaultIdentity":
  2816  			if v != nil {
  2817  				var defaultIdentity string
  2818  				err = json.Unmarshal(*v, &defaultIdentity)
  2819  				if err != nil {
  2820  					return err
  2821  				}
  2822  				dagp.DefaultIdentity = &defaultIdentity
  2823  			}
  2824  		case "publicNetworkAccess":
  2825  			if v != nil {
  2826  				var publicNetworkAccess PublicNetworkAccess
  2827  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2828  				if err != nil {
  2829  					return err
  2830  				}
  2831  				dagp.PublicNetworkAccess = publicNetworkAccess
  2832  			}
  2833  		case "enableFreeTier":
  2834  			if v != nil {
  2835  				var enableFreeTier bool
  2836  				err = json.Unmarshal(*v, &enableFreeTier)
  2837  				if err != nil {
  2838  					return err
  2839  				}
  2840  				dagp.EnableFreeTier = &enableFreeTier
  2841  			}
  2842  		case "apiProperties":
  2843  			if v != nil {
  2844  				var APIProperties APIProperties
  2845  				err = json.Unmarshal(*v, &APIProperties)
  2846  				if err != nil {
  2847  					return err
  2848  				}
  2849  				dagp.APIProperties = &APIProperties
  2850  			}
  2851  		case "enableAnalyticalStorage":
  2852  			if v != nil {
  2853  				var enableAnalyticalStorage bool
  2854  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2855  				if err != nil {
  2856  					return err
  2857  				}
  2858  				dagp.EnableAnalyticalStorage = &enableAnalyticalStorage
  2859  			}
  2860  		case "analyticalStorageConfiguration":
  2861  			if v != nil {
  2862  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  2863  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  2864  				if err != nil {
  2865  					return err
  2866  				}
  2867  				dagp.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  2868  			}
  2869  		case "instanceId":
  2870  			if v != nil {
  2871  				var instanceID string
  2872  				err = json.Unmarshal(*v, &instanceID)
  2873  				if err != nil {
  2874  					return err
  2875  				}
  2876  				dagp.InstanceID = &instanceID
  2877  			}
  2878  		case "createMode":
  2879  			if v != nil {
  2880  				var createMode CreateMode
  2881  				err = json.Unmarshal(*v, &createMode)
  2882  				if err != nil {
  2883  					return err
  2884  				}
  2885  				dagp.CreateMode = createMode
  2886  			}
  2887  		case "restoreParameters":
  2888  			if v != nil {
  2889  				var restoreParameters RestoreParameters
  2890  				err = json.Unmarshal(*v, &restoreParameters)
  2891  				if err != nil {
  2892  					return err
  2893  				}
  2894  				dagp.RestoreParameters = &restoreParameters
  2895  			}
  2896  		case "backupPolicy":
  2897  			if v != nil {
  2898  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2899  				if err != nil {
  2900  					return err
  2901  				}
  2902  				dagp.BackupPolicy = backupPolicy
  2903  			}
  2904  		case "cors":
  2905  			if v != nil {
  2906  				var cors []CorsPolicy
  2907  				err = json.Unmarshal(*v, &cors)
  2908  				if err != nil {
  2909  					return err
  2910  				}
  2911  				dagp.Cors = &cors
  2912  			}
  2913  		case "networkAclBypass":
  2914  			if v != nil {
  2915  				var networkACLBypass NetworkACLBypass
  2916  				err = json.Unmarshal(*v, &networkACLBypass)
  2917  				if err != nil {
  2918  					return err
  2919  				}
  2920  				dagp.NetworkACLBypass = networkACLBypass
  2921  			}
  2922  		case "networkAclBypassResourceIds":
  2923  			if v != nil {
  2924  				var networkACLBypassResourceIds []string
  2925  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2926  				if err != nil {
  2927  					return err
  2928  				}
  2929  				dagp.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2930  			}
  2931  		case "disableLocalAuth":
  2932  			if v != nil {
  2933  				var disableLocalAuth bool
  2934  				err = json.Unmarshal(*v, &disableLocalAuth)
  2935  				if err != nil {
  2936  					return err
  2937  				}
  2938  				dagp.DisableLocalAuth = &disableLocalAuth
  2939  			}
  2940  		case "capacity":
  2941  			if v != nil {
  2942  				var capacity Capacity
  2943  				err = json.Unmarshal(*v, &capacity)
  2944  				if err != nil {
  2945  					return err
  2946  				}
  2947  				dagp.Capacity = &capacity
  2948  			}
  2949  		case "keysMetadata":
  2950  			if v != nil {
  2951  				var keysMetadata DatabaseAccountKeysMetadata
  2952  				err = json.Unmarshal(*v, &keysMetadata)
  2953  				if err != nil {
  2954  					return err
  2955  				}
  2956  				dagp.KeysMetadata = &keysMetadata
  2957  			}
  2958  		case "enablePartitionMerge":
  2959  			if v != nil {
  2960  				var enablePartitionMerge bool
  2961  				err = json.Unmarshal(*v, &enablePartitionMerge)
  2962  				if err != nil {
  2963  					return err
  2964  				}
  2965  				dagp.EnablePartitionMerge = &enablePartitionMerge
  2966  			}
  2967  		}
  2968  	}
  2969  
  2970  	return nil
  2971  }
  2972  
  2973  // DatabaseAccountGetResults an Azure Cosmos DB database account.
  2974  type DatabaseAccountGetResults struct {
  2975  	autorest.Response `json:"-"`
  2976  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  2977  	Kind                          DatabaseAccountKind     `json:"kind,omitempty"`
  2978  	Identity                      *ManagedServiceIdentity `json:"identity,omitempty"`
  2979  	*DatabaseAccountGetProperties `json:"properties,omitempty"`
  2980  	// SystemData - READ-ONLY; The system meta data relating to this resource.
  2981  	SystemData *SystemData `json:"systemData,omitempty"`
  2982  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  2983  	ID *string `json:"id,omitempty"`
  2984  	// Name - READ-ONLY; The name of the ARM resource.
  2985  	Name *string `json:"name,omitempty"`
  2986  	// Type - READ-ONLY; The type of Azure resource.
  2987  	Type *string `json:"type,omitempty"`
  2988  	// Location - The location of the resource group to which the resource belongs.
  2989  	Location *string            `json:"location,omitempty"`
  2990  	Tags     map[string]*string `json:"tags"`
  2991  }
  2992  
  2993  // MarshalJSON is the custom marshaler for DatabaseAccountGetResults.
  2994  func (dagr DatabaseAccountGetResults) MarshalJSON() ([]byte, error) {
  2995  	objectMap := make(map[string]interface{})
  2996  	if dagr.Kind != "" {
  2997  		objectMap["kind"] = dagr.Kind
  2998  	}
  2999  	if dagr.Identity != nil {
  3000  		objectMap["identity"] = dagr.Identity
  3001  	}
  3002  	if dagr.DatabaseAccountGetProperties != nil {
  3003  		objectMap["properties"] = dagr.DatabaseAccountGetProperties
  3004  	}
  3005  	if dagr.Location != nil {
  3006  		objectMap["location"] = dagr.Location
  3007  	}
  3008  	if dagr.Tags != nil {
  3009  		objectMap["tags"] = dagr.Tags
  3010  	}
  3011  	return json.Marshal(objectMap)
  3012  }
  3013  
  3014  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetResults struct.
  3015  func (dagr *DatabaseAccountGetResults) UnmarshalJSON(body []byte) error {
  3016  	var m map[string]*json.RawMessage
  3017  	err := json.Unmarshal(body, &m)
  3018  	if err != nil {
  3019  		return err
  3020  	}
  3021  	for k, v := range m {
  3022  		switch k {
  3023  		case "kind":
  3024  			if v != nil {
  3025  				var kind DatabaseAccountKind
  3026  				err = json.Unmarshal(*v, &kind)
  3027  				if err != nil {
  3028  					return err
  3029  				}
  3030  				dagr.Kind = kind
  3031  			}
  3032  		case "identity":
  3033  			if v != nil {
  3034  				var identity ManagedServiceIdentity
  3035  				err = json.Unmarshal(*v, &identity)
  3036  				if err != nil {
  3037  					return err
  3038  				}
  3039  				dagr.Identity = &identity
  3040  			}
  3041  		case "properties":
  3042  			if v != nil {
  3043  				var databaseAccountGetProperties DatabaseAccountGetProperties
  3044  				err = json.Unmarshal(*v, &databaseAccountGetProperties)
  3045  				if err != nil {
  3046  					return err
  3047  				}
  3048  				dagr.DatabaseAccountGetProperties = &databaseAccountGetProperties
  3049  			}
  3050  		case "systemData":
  3051  			if v != nil {
  3052  				var systemData SystemData
  3053  				err = json.Unmarshal(*v, &systemData)
  3054  				if err != nil {
  3055  					return err
  3056  				}
  3057  				dagr.SystemData = &systemData
  3058  			}
  3059  		case "id":
  3060  			if v != nil {
  3061  				var ID string
  3062  				err = json.Unmarshal(*v, &ID)
  3063  				if err != nil {
  3064  					return err
  3065  				}
  3066  				dagr.ID = &ID
  3067  			}
  3068  		case "name":
  3069  			if v != nil {
  3070  				var name string
  3071  				err = json.Unmarshal(*v, &name)
  3072  				if err != nil {
  3073  					return err
  3074  				}
  3075  				dagr.Name = &name
  3076  			}
  3077  		case "type":
  3078  			if v != nil {
  3079  				var typeVar string
  3080  				err = json.Unmarshal(*v, &typeVar)
  3081  				if err != nil {
  3082  					return err
  3083  				}
  3084  				dagr.Type = &typeVar
  3085  			}
  3086  		case "location":
  3087  			if v != nil {
  3088  				var location string
  3089  				err = json.Unmarshal(*v, &location)
  3090  				if err != nil {
  3091  					return err
  3092  				}
  3093  				dagr.Location = &location
  3094  			}
  3095  		case "tags":
  3096  			if v != nil {
  3097  				var tags map[string]*string
  3098  				err = json.Unmarshal(*v, &tags)
  3099  				if err != nil {
  3100  					return err
  3101  				}
  3102  				dagr.Tags = tags
  3103  			}
  3104  		}
  3105  	}
  3106  
  3107  	return nil
  3108  }
  3109  
  3110  // DatabaseAccountKeysMetadata the metadata related to each access key for the given Cosmos DB database
  3111  // account.
  3112  type DatabaseAccountKeysMetadata struct {
  3113  	// PrimaryMasterKey - READ-ONLY; The metadata related to the Primary Read-Write Key for the given Cosmos DB database account.
  3114  	PrimaryMasterKey *AccountKeyMetadata `json:"primaryMasterKey,omitempty"`
  3115  	// SecondaryMasterKey - READ-ONLY; The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account.
  3116  	SecondaryMasterKey *AccountKeyMetadata `json:"secondaryMasterKey,omitempty"`
  3117  	// PrimaryReadonlyMasterKey - READ-ONLY; The metadata related to the Primary Read-Only Key for the given Cosmos DB database account.
  3118  	PrimaryReadonlyMasterKey *AccountKeyMetadata `json:"primaryReadonlyMasterKey,omitempty"`
  3119  	// SecondaryReadonlyMasterKey - READ-ONLY; The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account.
  3120  	SecondaryReadonlyMasterKey *AccountKeyMetadata `json:"secondaryReadonlyMasterKey,omitempty"`
  3121  }
  3122  
  3123  // MarshalJSON is the custom marshaler for DatabaseAccountKeysMetadata.
  3124  func (dakm DatabaseAccountKeysMetadata) MarshalJSON() ([]byte, error) {
  3125  	objectMap := make(map[string]interface{})
  3126  	return json.Marshal(objectMap)
  3127  }
  3128  
  3129  // DatabaseAccountListConnectionStringsResult the connection strings for the given database account.
  3130  type DatabaseAccountListConnectionStringsResult struct {
  3131  	autorest.Response `json:"-"`
  3132  	// ConnectionStrings - An array that contains the connection strings for the Cosmos DB account.
  3133  	ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"`
  3134  }
  3135  
  3136  // DatabaseAccountListKeysResult the access keys for the given database account.
  3137  type DatabaseAccountListKeysResult struct {
  3138  	autorest.Response `json:"-"`
  3139  	// PrimaryMasterKey - READ-ONLY; Base 64 encoded value of the primary read-write key.
  3140  	PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"`
  3141  	// SecondaryMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-write key.
  3142  	SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty"`
  3143  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3144  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3145  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3146  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3147  }
  3148  
  3149  // MarshalJSON is the custom marshaler for DatabaseAccountListKeysResult.
  3150  func (dalkr DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error) {
  3151  	objectMap := make(map[string]interface{})
  3152  	return json.Marshal(objectMap)
  3153  }
  3154  
  3155  // DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account.
  3156  type DatabaseAccountListReadOnlyKeysResult struct {
  3157  	autorest.Response `json:"-"`
  3158  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3159  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3160  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3161  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3162  }
  3163  
  3164  // MarshalJSON is the custom marshaler for DatabaseAccountListReadOnlyKeysResult.
  3165  func (dalrokr DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error) {
  3166  	objectMap := make(map[string]interface{})
  3167  	return json.Marshal(objectMap)
  3168  }
  3169  
  3170  // DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account.
  3171  type DatabaseAccountRegenerateKeyParameters struct {
  3172  	// KeyKind - The access key to regenerate. Possible values include: 'Primary', 'Secondary', 'PrimaryReadonly', 'SecondaryReadonly'
  3173  	KeyKind KeyKind `json:"keyKind,omitempty"`
  3174  }
  3175  
  3176  // DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  3177  // long-running operation.
  3178  type DatabaseAccountsCreateOrUpdateFuture struct {
  3179  	azure.FutureAPI
  3180  	// Result returns the result of the asynchronous operation.
  3181  	// If the operation has not completed it will return an error.
  3182  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3183  }
  3184  
  3185  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3186  func (future *DatabaseAccountsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  3187  	var azFuture azure.Future
  3188  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3189  		return err
  3190  	}
  3191  	future.FutureAPI = &azFuture
  3192  	future.Result = future.result
  3193  	return nil
  3194  }
  3195  
  3196  // result is the default implementation for DatabaseAccountsCreateOrUpdateFuture.Result.
  3197  func (future *DatabaseAccountsCreateOrUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3198  	var done bool
  3199  	done, err = future.DoneWithContext(context.Background(), client)
  3200  	if err != nil {
  3201  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  3202  		return
  3203  	}
  3204  	if !done {
  3205  		dagr.Response.Response = future.Response()
  3206  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
  3207  		return
  3208  	}
  3209  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3210  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3211  		dagr, err = client.CreateOrUpdateResponder(dagr.Response.Response)
  3212  		if err != nil {
  3213  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3214  		}
  3215  	}
  3216  	return
  3217  }
  3218  
  3219  // DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  3220  // operation.
  3221  type DatabaseAccountsDeleteFuture struct {
  3222  	azure.FutureAPI
  3223  	// Result returns the result of the asynchronous operation.
  3224  	// If the operation has not completed it will return an error.
  3225  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3226  }
  3227  
  3228  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3229  func (future *DatabaseAccountsDeleteFuture) UnmarshalJSON(body []byte) error {
  3230  	var azFuture azure.Future
  3231  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3232  		return err
  3233  	}
  3234  	future.FutureAPI = &azFuture
  3235  	future.Result = future.result
  3236  	return nil
  3237  }
  3238  
  3239  // result is the default implementation for DatabaseAccountsDeleteFuture.Result.
  3240  func (future *DatabaseAccountsDeleteFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3241  	var done bool
  3242  	done, err = future.DoneWithContext(context.Background(), client)
  3243  	if err != nil {
  3244  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Polling failure")
  3245  		return
  3246  	}
  3247  	if !done {
  3248  		ar.Response = future.Response()
  3249  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
  3250  		return
  3251  	}
  3252  	ar.Response = future.Response()
  3253  	return
  3254  }
  3255  
  3256  // DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of
  3257  // a long-running operation.
  3258  type DatabaseAccountsFailoverPriorityChangeFuture struct {
  3259  	azure.FutureAPI
  3260  	// Result returns the result of the asynchronous operation.
  3261  	// If the operation has not completed it will return an error.
  3262  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3263  }
  3264  
  3265  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3266  func (future *DatabaseAccountsFailoverPriorityChangeFuture) UnmarshalJSON(body []byte) error {
  3267  	var azFuture azure.Future
  3268  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3269  		return err
  3270  	}
  3271  	future.FutureAPI = &azFuture
  3272  	future.Result = future.result
  3273  	return nil
  3274  }
  3275  
  3276  // result is the default implementation for DatabaseAccountsFailoverPriorityChangeFuture.Result.
  3277  func (future *DatabaseAccountsFailoverPriorityChangeFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3278  	var done bool
  3279  	done, err = future.DoneWithContext(context.Background(), client)
  3280  	if err != nil {
  3281  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Polling failure")
  3282  		return
  3283  	}
  3284  	if !done {
  3285  		ar.Response = future.Response()
  3286  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
  3287  		return
  3288  	}
  3289  	ar.Response = future.Response()
  3290  	return
  3291  }
  3292  
  3293  // DatabaseAccountsListResult the List operation response, that contains the database accounts and their
  3294  // properties.
  3295  type DatabaseAccountsListResult struct {
  3296  	autorest.Response `json:"-"`
  3297  	// Value - READ-ONLY; List of database account and their properties.
  3298  	Value *[]DatabaseAccountGetResults `json:"value,omitempty"`
  3299  }
  3300  
  3301  // MarshalJSON is the custom marshaler for DatabaseAccountsListResult.
  3302  func (dalr DatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  3303  	objectMap := make(map[string]interface{})
  3304  	return json.Marshal(objectMap)
  3305  }
  3306  
  3307  // DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a
  3308  // long-running operation.
  3309  type DatabaseAccountsOfflineRegionFuture struct {
  3310  	azure.FutureAPI
  3311  	// Result returns the result of the asynchronous operation.
  3312  	// If the operation has not completed it will return an error.
  3313  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3314  }
  3315  
  3316  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3317  func (future *DatabaseAccountsOfflineRegionFuture) UnmarshalJSON(body []byte) error {
  3318  	var azFuture azure.Future
  3319  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3320  		return err
  3321  	}
  3322  	future.FutureAPI = &azFuture
  3323  	future.Result = future.result
  3324  	return nil
  3325  }
  3326  
  3327  // result is the default implementation for DatabaseAccountsOfflineRegionFuture.Result.
  3328  func (future *DatabaseAccountsOfflineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3329  	var done bool
  3330  	done, err = future.DoneWithContext(context.Background(), client)
  3331  	if err != nil {
  3332  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure")
  3333  		return
  3334  	}
  3335  	if !done {
  3336  		ar.Response = future.Response()
  3337  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture")
  3338  		return
  3339  	}
  3340  	ar.Response = future.Response()
  3341  	return
  3342  }
  3343  
  3344  // DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a
  3345  // long-running operation.
  3346  type DatabaseAccountsOnlineRegionFuture struct {
  3347  	azure.FutureAPI
  3348  	// Result returns the result of the asynchronous operation.
  3349  	// If the operation has not completed it will return an error.
  3350  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3351  }
  3352  
  3353  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3354  func (future *DatabaseAccountsOnlineRegionFuture) UnmarshalJSON(body []byte) error {
  3355  	var azFuture azure.Future
  3356  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3357  		return err
  3358  	}
  3359  	future.FutureAPI = &azFuture
  3360  	future.Result = future.result
  3361  	return nil
  3362  }
  3363  
  3364  // result is the default implementation for DatabaseAccountsOnlineRegionFuture.Result.
  3365  func (future *DatabaseAccountsOnlineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3366  	var done bool
  3367  	done, err = future.DoneWithContext(context.Background(), client)
  3368  	if err != nil {
  3369  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure")
  3370  		return
  3371  	}
  3372  	if !done {
  3373  		ar.Response = future.Response()
  3374  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture")
  3375  		return
  3376  	}
  3377  	ar.Response = future.Response()
  3378  	return
  3379  }
  3380  
  3381  // DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a
  3382  // long-running operation.
  3383  type DatabaseAccountsRegenerateKeyFuture struct {
  3384  	azure.FutureAPI
  3385  	// Result returns the result of the asynchronous operation.
  3386  	// If the operation has not completed it will return an error.
  3387  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3388  }
  3389  
  3390  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3391  func (future *DatabaseAccountsRegenerateKeyFuture) UnmarshalJSON(body []byte) error {
  3392  	var azFuture azure.Future
  3393  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3394  		return err
  3395  	}
  3396  	future.FutureAPI = &azFuture
  3397  	future.Result = future.result
  3398  	return nil
  3399  }
  3400  
  3401  // result is the default implementation for DatabaseAccountsRegenerateKeyFuture.Result.
  3402  func (future *DatabaseAccountsRegenerateKeyFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3403  	var done bool
  3404  	done, err = future.DoneWithContext(context.Background(), client)
  3405  	if err != nil {
  3406  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Polling failure")
  3407  		return
  3408  	}
  3409  	if !done {
  3410  		ar.Response = future.Response()
  3411  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
  3412  		return
  3413  	}
  3414  	ar.Response = future.Response()
  3415  	return
  3416  }
  3417  
  3418  // DatabaseAccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  3419  // operation.
  3420  type DatabaseAccountsUpdateFuture struct {
  3421  	azure.FutureAPI
  3422  	// Result returns the result of the asynchronous operation.
  3423  	// If the operation has not completed it will return an error.
  3424  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3425  }
  3426  
  3427  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3428  func (future *DatabaseAccountsUpdateFuture) UnmarshalJSON(body []byte) error {
  3429  	var azFuture azure.Future
  3430  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3431  		return err
  3432  	}
  3433  	future.FutureAPI = &azFuture
  3434  	future.Result = future.result
  3435  	return nil
  3436  }
  3437  
  3438  // result is the default implementation for DatabaseAccountsUpdateFuture.Result.
  3439  func (future *DatabaseAccountsUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3440  	var done bool
  3441  	done, err = future.DoneWithContext(context.Background(), client)
  3442  	if err != nil {
  3443  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", future.Response(), "Polling failure")
  3444  		return
  3445  	}
  3446  	if !done {
  3447  		dagr.Response.Response = future.Response()
  3448  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateFuture")
  3449  		return
  3450  	}
  3451  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3452  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3453  		dagr, err = client.UpdateResponder(dagr.Response.Response)
  3454  		if err != nil {
  3455  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3456  		}
  3457  	}
  3458  	return
  3459  }
  3460  
  3461  // DatabaseAccountUpdateParameters parameters for patching Azure Cosmos DB database account properties.
  3462  type DatabaseAccountUpdateParameters struct {
  3463  	Tags map[string]*string `json:"tags"`
  3464  	// Location - The location of the resource group to which the resource belongs.
  3465  	Location                         *string                 `json:"location,omitempty"`
  3466  	Identity                         *ManagedServiceIdentity `json:"identity,omitempty"`
  3467  	*DatabaseAccountUpdateProperties `json:"properties,omitempty"`
  3468  }
  3469  
  3470  // MarshalJSON is the custom marshaler for DatabaseAccountUpdateParameters.
  3471  func (daup DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) {
  3472  	objectMap := make(map[string]interface{})
  3473  	if daup.Tags != nil {
  3474  		objectMap["tags"] = daup.Tags
  3475  	}
  3476  	if daup.Location != nil {
  3477  		objectMap["location"] = daup.Location
  3478  	}
  3479  	if daup.Identity != nil {
  3480  		objectMap["identity"] = daup.Identity
  3481  	}
  3482  	if daup.DatabaseAccountUpdateProperties != nil {
  3483  		objectMap["properties"] = daup.DatabaseAccountUpdateProperties
  3484  	}
  3485  	return json.Marshal(objectMap)
  3486  }
  3487  
  3488  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateParameters struct.
  3489  func (daup *DatabaseAccountUpdateParameters) UnmarshalJSON(body []byte) error {
  3490  	var m map[string]*json.RawMessage
  3491  	err := json.Unmarshal(body, &m)
  3492  	if err != nil {
  3493  		return err
  3494  	}
  3495  	for k, v := range m {
  3496  		switch k {
  3497  		case "tags":
  3498  			if v != nil {
  3499  				var tags map[string]*string
  3500  				err = json.Unmarshal(*v, &tags)
  3501  				if err != nil {
  3502  					return err
  3503  				}
  3504  				daup.Tags = tags
  3505  			}
  3506  		case "location":
  3507  			if v != nil {
  3508  				var location string
  3509  				err = json.Unmarshal(*v, &location)
  3510  				if err != nil {
  3511  					return err
  3512  				}
  3513  				daup.Location = &location
  3514  			}
  3515  		case "identity":
  3516  			if v != nil {
  3517  				var identity ManagedServiceIdentity
  3518  				err = json.Unmarshal(*v, &identity)
  3519  				if err != nil {
  3520  					return err
  3521  				}
  3522  				daup.Identity = &identity
  3523  			}
  3524  		case "properties":
  3525  			if v != nil {
  3526  				var databaseAccountUpdateProperties DatabaseAccountUpdateProperties
  3527  				err = json.Unmarshal(*v, &databaseAccountUpdateProperties)
  3528  				if err != nil {
  3529  					return err
  3530  				}
  3531  				daup.DatabaseAccountUpdateProperties = &databaseAccountUpdateProperties
  3532  			}
  3533  		}
  3534  	}
  3535  
  3536  	return nil
  3537  }
  3538  
  3539  // DatabaseAccountUpdateProperties properties to update Azure Cosmos DB database accounts.
  3540  type DatabaseAccountUpdateProperties struct {
  3541  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  3542  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  3543  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  3544  	Locations *[]Location `json:"locations,omitempty"`
  3545  	// IPRules - List of IpRules.
  3546  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  3547  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  3548  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  3549  	// 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.
  3550  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  3551  	// Capabilities - List of Cosmos DB capabilities for the account
  3552  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  3553  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  3554  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  3555  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  3556  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  3557  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  3558  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  3559  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
  3560  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  3561  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  3562  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  3563  	// KeyVaultKeyURI - The URI of the key vault
  3564  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  3565  	// 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.
  3566  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  3567  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled'
  3568  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  3569  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  3570  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  3571  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  3572  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  3573  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  3574  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  3575  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  3576  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  3577  	// BackupPolicy - The object representing the policy for taking backups on an account.
  3578  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  3579  	// Cors - The CORS policy for the Cosmos DB database account.
  3580  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  3581  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  3582  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  3583  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  3584  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  3585  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  3586  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  3587  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  3588  	Capacity *Capacity `json:"capacity,omitempty"`
  3589  	// KeysMetadata - This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account.
  3590  	KeysMetadata *DatabaseAccountKeysMetadata `json:"keysMetadata,omitempty"`
  3591  	// EnablePartitionMerge - Flag to indicate enabling/disabling of Partition Merge feature on the account
  3592  	EnablePartitionMerge *bool `json:"enablePartitionMerge,omitempty"`
  3593  }
  3594  
  3595  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateProperties struct.
  3596  func (daup *DatabaseAccountUpdateProperties) UnmarshalJSON(body []byte) error {
  3597  	var m map[string]*json.RawMessage
  3598  	err := json.Unmarshal(body, &m)
  3599  	if err != nil {
  3600  		return err
  3601  	}
  3602  	for k, v := range m {
  3603  		switch k {
  3604  		case "consistencyPolicy":
  3605  			if v != nil {
  3606  				var consistencyPolicy ConsistencyPolicy
  3607  				err = json.Unmarshal(*v, &consistencyPolicy)
  3608  				if err != nil {
  3609  					return err
  3610  				}
  3611  				daup.ConsistencyPolicy = &consistencyPolicy
  3612  			}
  3613  		case "locations":
  3614  			if v != nil {
  3615  				var locations []Location
  3616  				err = json.Unmarshal(*v, &locations)
  3617  				if err != nil {
  3618  					return err
  3619  				}
  3620  				daup.Locations = &locations
  3621  			}
  3622  		case "ipRules":
  3623  			if v != nil {
  3624  				var IPRules []IPAddressOrRange
  3625  				err = json.Unmarshal(*v, &IPRules)
  3626  				if err != nil {
  3627  					return err
  3628  				}
  3629  				daup.IPRules = &IPRules
  3630  			}
  3631  		case "isVirtualNetworkFilterEnabled":
  3632  			if v != nil {
  3633  				var isVirtualNetworkFilterEnabled bool
  3634  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  3635  				if err != nil {
  3636  					return err
  3637  				}
  3638  				daup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  3639  			}
  3640  		case "enableAutomaticFailover":
  3641  			if v != nil {
  3642  				var enableAutomaticFailover bool
  3643  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  3644  				if err != nil {
  3645  					return err
  3646  				}
  3647  				daup.EnableAutomaticFailover = &enableAutomaticFailover
  3648  			}
  3649  		case "capabilities":
  3650  			if v != nil {
  3651  				var capabilities []Capability
  3652  				err = json.Unmarshal(*v, &capabilities)
  3653  				if err != nil {
  3654  					return err
  3655  				}
  3656  				daup.Capabilities = &capabilities
  3657  			}
  3658  		case "virtualNetworkRules":
  3659  			if v != nil {
  3660  				var virtualNetworkRules []VirtualNetworkRule
  3661  				err = json.Unmarshal(*v, &virtualNetworkRules)
  3662  				if err != nil {
  3663  					return err
  3664  				}
  3665  				daup.VirtualNetworkRules = &virtualNetworkRules
  3666  			}
  3667  		case "enableMultipleWriteLocations":
  3668  			if v != nil {
  3669  				var enableMultipleWriteLocations bool
  3670  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  3671  				if err != nil {
  3672  					return err
  3673  				}
  3674  				daup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  3675  			}
  3676  		case "enableCassandraConnector":
  3677  			if v != nil {
  3678  				var enableCassandraConnector bool
  3679  				err = json.Unmarshal(*v, &enableCassandraConnector)
  3680  				if err != nil {
  3681  					return err
  3682  				}
  3683  				daup.EnableCassandraConnector = &enableCassandraConnector
  3684  			}
  3685  		case "connectorOffer":
  3686  			if v != nil {
  3687  				var connectorOffer ConnectorOffer
  3688  				err = json.Unmarshal(*v, &connectorOffer)
  3689  				if err != nil {
  3690  					return err
  3691  				}
  3692  				daup.ConnectorOffer = connectorOffer
  3693  			}
  3694  		case "disableKeyBasedMetadataWriteAccess":
  3695  			if v != nil {
  3696  				var disableKeyBasedMetadataWriteAccess bool
  3697  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  3698  				if err != nil {
  3699  					return err
  3700  				}
  3701  				daup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  3702  			}
  3703  		case "keyVaultKeyUri":
  3704  			if v != nil {
  3705  				var keyVaultKeyURI string
  3706  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  3707  				if err != nil {
  3708  					return err
  3709  				}
  3710  				daup.KeyVaultKeyURI = &keyVaultKeyURI
  3711  			}
  3712  		case "defaultIdentity":
  3713  			if v != nil {
  3714  				var defaultIdentity string
  3715  				err = json.Unmarshal(*v, &defaultIdentity)
  3716  				if err != nil {
  3717  					return err
  3718  				}
  3719  				daup.DefaultIdentity = &defaultIdentity
  3720  			}
  3721  		case "publicNetworkAccess":
  3722  			if v != nil {
  3723  				var publicNetworkAccess PublicNetworkAccess
  3724  				err = json.Unmarshal(*v, &publicNetworkAccess)
  3725  				if err != nil {
  3726  					return err
  3727  				}
  3728  				daup.PublicNetworkAccess = publicNetworkAccess
  3729  			}
  3730  		case "enableFreeTier":
  3731  			if v != nil {
  3732  				var enableFreeTier bool
  3733  				err = json.Unmarshal(*v, &enableFreeTier)
  3734  				if err != nil {
  3735  					return err
  3736  				}
  3737  				daup.EnableFreeTier = &enableFreeTier
  3738  			}
  3739  		case "apiProperties":
  3740  			if v != nil {
  3741  				var APIProperties APIProperties
  3742  				err = json.Unmarshal(*v, &APIProperties)
  3743  				if err != nil {
  3744  					return err
  3745  				}
  3746  				daup.APIProperties = &APIProperties
  3747  			}
  3748  		case "enableAnalyticalStorage":
  3749  			if v != nil {
  3750  				var enableAnalyticalStorage bool
  3751  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  3752  				if err != nil {
  3753  					return err
  3754  				}
  3755  				daup.EnableAnalyticalStorage = &enableAnalyticalStorage
  3756  			}
  3757  		case "analyticalStorageConfiguration":
  3758  			if v != nil {
  3759  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  3760  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  3761  				if err != nil {
  3762  					return err
  3763  				}
  3764  				daup.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  3765  			}
  3766  		case "backupPolicy":
  3767  			if v != nil {
  3768  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  3769  				if err != nil {
  3770  					return err
  3771  				}
  3772  				daup.BackupPolicy = backupPolicy
  3773  			}
  3774  		case "cors":
  3775  			if v != nil {
  3776  				var cors []CorsPolicy
  3777  				err = json.Unmarshal(*v, &cors)
  3778  				if err != nil {
  3779  					return err
  3780  				}
  3781  				daup.Cors = &cors
  3782  			}
  3783  		case "networkAclBypass":
  3784  			if v != nil {
  3785  				var networkACLBypass NetworkACLBypass
  3786  				err = json.Unmarshal(*v, &networkACLBypass)
  3787  				if err != nil {
  3788  					return err
  3789  				}
  3790  				daup.NetworkACLBypass = networkACLBypass
  3791  			}
  3792  		case "networkAclBypassResourceIds":
  3793  			if v != nil {
  3794  				var networkACLBypassResourceIds []string
  3795  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  3796  				if err != nil {
  3797  					return err
  3798  				}
  3799  				daup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  3800  			}
  3801  		case "disableLocalAuth":
  3802  			if v != nil {
  3803  				var disableLocalAuth bool
  3804  				err = json.Unmarshal(*v, &disableLocalAuth)
  3805  				if err != nil {
  3806  					return err
  3807  				}
  3808  				daup.DisableLocalAuth = &disableLocalAuth
  3809  			}
  3810  		case "capacity":
  3811  			if v != nil {
  3812  				var capacity Capacity
  3813  				err = json.Unmarshal(*v, &capacity)
  3814  				if err != nil {
  3815  					return err
  3816  				}
  3817  				daup.Capacity = &capacity
  3818  			}
  3819  		case "keysMetadata":
  3820  			if v != nil {
  3821  				var keysMetadata DatabaseAccountKeysMetadata
  3822  				err = json.Unmarshal(*v, &keysMetadata)
  3823  				if err != nil {
  3824  					return err
  3825  				}
  3826  				daup.KeysMetadata = &keysMetadata
  3827  			}
  3828  		case "enablePartitionMerge":
  3829  			if v != nil {
  3830  				var enablePartitionMerge bool
  3831  				err = json.Unmarshal(*v, &enablePartitionMerge)
  3832  				if err != nil {
  3833  					return err
  3834  				}
  3835  				daup.EnablePartitionMerge = &enablePartitionMerge
  3836  			}
  3837  		}
  3838  	}
  3839  
  3840  	return nil
  3841  }
  3842  
  3843  // DatabaseRestoreResource specific Databases to restore.
  3844  type DatabaseRestoreResource struct {
  3845  	// DatabaseName - The name of the database available for restore.
  3846  	DatabaseName *string `json:"databaseName,omitempty"`
  3847  	// CollectionNames - The names of the collections available for restore.
  3848  	CollectionNames *[]string `json:"collectionNames,omitempty"`
  3849  }
  3850  
  3851  // DataCenterResource a managed Cassandra data center.
  3852  type DataCenterResource struct {
  3853  	autorest.Response `json:"-"`
  3854  	// Properties - Properties of a managed Cassandra data center.
  3855  	Properties *DataCenterResourceProperties `json:"properties,omitempty"`
  3856  	// ID - READ-ONLY; The unique resource identifier of the database account.
  3857  	ID *string `json:"id,omitempty"`
  3858  	// Name - READ-ONLY; The name of the database account.
  3859  	Name *string `json:"name,omitempty"`
  3860  	// Type - READ-ONLY; The type of Azure resource.
  3861  	Type *string `json:"type,omitempty"`
  3862  }
  3863  
  3864  // MarshalJSON is the custom marshaler for DataCenterResource.
  3865  func (dcr DataCenterResource) MarshalJSON() ([]byte, error) {
  3866  	objectMap := make(map[string]interface{})
  3867  	if dcr.Properties != nil {
  3868  		objectMap["properties"] = dcr.Properties
  3869  	}
  3870  	return json.Marshal(objectMap)
  3871  }
  3872  
  3873  // DataCenterResourceProperties properties of a managed Cassandra data center.
  3874  type DataCenterResourceProperties struct {
  3875  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  3876  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  3877  	// DataCenterLocation - The region this data center should be created in.
  3878  	DataCenterLocation *string `json:"dataCenterLocation,omitempty"`
  3879  	// 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>'.
  3880  	DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty"`
  3881  	// 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.
  3882  	NodeCount *int32 `json:"nodeCount,omitempty"`
  3883  	// 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.
  3884  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  3885  	// 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.
  3886  	Base64EncodedCassandraYamlFragment *string `json:"base64EncodedCassandraYamlFragment,omitempty"`
  3887  	// ManagedDiskCustomerKeyURI - Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key.
  3888  	ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty"`
  3889  	// BackupStorageCustomerKeyURI - Indicates the Key Uri of the customer key to use for encryption of the backup storage account.
  3890  	BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty"`
  3891  	// Sku - Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2
  3892  	Sku *string `json:"sku,omitempty"`
  3893  	// DiskSku - Disk SKU used for data centers. Default value is P30.
  3894  	DiskSku *string `json:"diskSku,omitempty"`
  3895  	// DiskCapacity - Number of disk used for data centers. Default value is 4.
  3896  	DiskCapacity *int32 `json:"diskCapacity,omitempty"`
  3897  	// AvailabilityZone - If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines.
  3898  	AvailabilityZone *bool `json:"availabilityZone,omitempty"`
  3899  }
  3900  
  3901  // MarshalJSON is the custom marshaler for DataCenterResourceProperties.
  3902  func (dcr DataCenterResourceProperties) MarshalJSON() ([]byte, error) {
  3903  	objectMap := make(map[string]interface{})
  3904  	if dcr.ProvisioningState != "" {
  3905  		objectMap["provisioningState"] = dcr.ProvisioningState
  3906  	}
  3907  	if dcr.DataCenterLocation != nil {
  3908  		objectMap["dataCenterLocation"] = dcr.DataCenterLocation
  3909  	}
  3910  	if dcr.DelegatedSubnetID != nil {
  3911  		objectMap["delegatedSubnetId"] = dcr.DelegatedSubnetID
  3912  	}
  3913  	if dcr.NodeCount != nil {
  3914  		objectMap["nodeCount"] = dcr.NodeCount
  3915  	}
  3916  	if dcr.Base64EncodedCassandraYamlFragment != nil {
  3917  		objectMap["base64EncodedCassandraYamlFragment"] = dcr.Base64EncodedCassandraYamlFragment
  3918  	}
  3919  	if dcr.ManagedDiskCustomerKeyURI != nil {
  3920  		objectMap["managedDiskCustomerKeyUri"] = dcr.ManagedDiskCustomerKeyURI
  3921  	}
  3922  	if dcr.BackupStorageCustomerKeyURI != nil {
  3923  		objectMap["backupStorageCustomerKeyUri"] = dcr.BackupStorageCustomerKeyURI
  3924  	}
  3925  	if dcr.Sku != nil {
  3926  		objectMap["sku"] = dcr.Sku
  3927  	}
  3928  	if dcr.DiskSku != nil {
  3929  		objectMap["diskSku"] = dcr.DiskSku
  3930  	}
  3931  	if dcr.DiskCapacity != nil {
  3932  		objectMap["diskCapacity"] = dcr.DiskCapacity
  3933  	}
  3934  	if dcr.AvailabilityZone != nil {
  3935  		objectMap["availabilityZone"] = dcr.AvailabilityZone
  3936  	}
  3937  	return json.Marshal(objectMap)
  3938  }
  3939  
  3940  // DataTransferRegionalServiceResource resource for a regional service location.
  3941  type DataTransferRegionalServiceResource struct {
  3942  	// Name - READ-ONLY; The regional service name.
  3943  	Name *string `json:"name,omitempty"`
  3944  	// Location - READ-ONLY; The location name.
  3945  	Location *string `json:"location,omitempty"`
  3946  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  3947  	Status ServiceStatus `json:"status,omitempty"`
  3948  }
  3949  
  3950  // MarshalJSON is the custom marshaler for DataTransferRegionalServiceResource.
  3951  func (dtrsr DataTransferRegionalServiceResource) MarshalJSON() ([]byte, error) {
  3952  	objectMap := make(map[string]interface{})
  3953  	return json.Marshal(objectMap)
  3954  }
  3955  
  3956  // DataTransferServiceResource describes the service response property.
  3957  type DataTransferServiceResource struct {
  3958  	Properties *DataTransferServiceResourceProperties `json:"properties,omitempty"`
  3959  }
  3960  
  3961  // DataTransferServiceResourceProperties properties for DataTransferServiceResource.
  3962  type DataTransferServiceResourceProperties struct {
  3963  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
  3964  	Locations *[]DataTransferRegionalServiceResource `json:"locations,omitempty"`
  3965  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  3966  	AdditionalProperties map[string]interface{} `json:""`
  3967  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  3968  	CreationTime *date.Time `json:"creationTime,omitempty"`
  3969  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
  3970  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  3971  	// InstanceCount - Instance count for the service.
  3972  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  3973  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  3974  	Status ServiceStatus `json:"status,omitempty"`
  3975  	// ServiceType - Possible values include: 'ServiceTypeServiceResourceProperties', 'ServiceTypeDataTransfer', 'ServiceTypeSQLDedicatedGateway', 'ServiceTypeGraphAPICompute', 'ServiceTypeMaterializedViewsBuilder'
  3976  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  3977  }
  3978  
  3979  // MarshalJSON is the custom marshaler for DataTransferServiceResourceProperties.
  3980  func (dtsrp DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) {
  3981  	dtsrp.ServiceType = ServiceTypeDataTransfer
  3982  	objectMap := make(map[string]interface{})
  3983  	if dtsrp.InstanceSize != "" {
  3984  		objectMap["instanceSize"] = dtsrp.InstanceSize
  3985  	}
  3986  	if dtsrp.InstanceCount != nil {
  3987  		objectMap["instanceCount"] = dtsrp.InstanceCount
  3988  	}
  3989  	if dtsrp.ServiceType != "" {
  3990  		objectMap["serviceType"] = dtsrp.ServiceType
  3991  	}
  3992  	for k, v := range dtsrp.AdditionalProperties {
  3993  		objectMap[k] = v
  3994  	}
  3995  	return json.Marshal(objectMap)
  3996  }
  3997  
  3998  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  3999  func (dtsrp DataTransferServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  4000  	return &dtsrp, true
  4001  }
  4002  
  4003  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  4004  func (dtsrp DataTransferServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  4005  	return nil, false
  4006  }
  4007  
  4008  // AsGraphAPIComputeServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  4009  func (dtsrp DataTransferServiceResourceProperties) AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool) {
  4010  	return nil, false
  4011  }
  4012  
  4013  // AsMaterializedViewsBuilderServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  4014  func (dtsrp DataTransferServiceResourceProperties) AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool) {
  4015  	return nil, false
  4016  }
  4017  
  4018  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  4019  func (dtsrp DataTransferServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  4020  	return nil, false
  4021  }
  4022  
  4023  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for DataTransferServiceResourceProperties.
  4024  func (dtsrp DataTransferServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  4025  	return &dtsrp, true
  4026  }
  4027  
  4028  // UnmarshalJSON is the custom unmarshaler for DataTransferServiceResourceProperties struct.
  4029  func (dtsrp *DataTransferServiceResourceProperties) UnmarshalJSON(body []byte) error {
  4030  	var m map[string]*json.RawMessage
  4031  	err := json.Unmarshal(body, &m)
  4032  	if err != nil {
  4033  		return err
  4034  	}
  4035  	for k, v := range m {
  4036  		switch k {
  4037  		case "locations":
  4038  			if v != nil {
  4039  				var locations []DataTransferRegionalServiceResource
  4040  				err = json.Unmarshal(*v, &locations)
  4041  				if err != nil {
  4042  					return err
  4043  				}
  4044  				dtsrp.Locations = &locations
  4045  			}
  4046  		default:
  4047  			if v != nil {
  4048  				var additionalProperties interface{}
  4049  				err = json.Unmarshal(*v, &additionalProperties)
  4050  				if err != nil {
  4051  					return err
  4052  				}
  4053  				if dtsrp.AdditionalProperties == nil {
  4054  					dtsrp.AdditionalProperties = make(map[string]interface{})
  4055  				}
  4056  				dtsrp.AdditionalProperties[k] = additionalProperties
  4057  			}
  4058  		case "creationTime":
  4059  			if v != nil {
  4060  				var creationTime date.Time
  4061  				err = json.Unmarshal(*v, &creationTime)
  4062  				if err != nil {
  4063  					return err
  4064  				}
  4065  				dtsrp.CreationTime = &creationTime
  4066  			}
  4067  		case "instanceSize":
  4068  			if v != nil {
  4069  				var instanceSize ServiceSize
  4070  				err = json.Unmarshal(*v, &instanceSize)
  4071  				if err != nil {
  4072  					return err
  4073  				}
  4074  				dtsrp.InstanceSize = instanceSize
  4075  			}
  4076  		case "instanceCount":
  4077  			if v != nil {
  4078  				var instanceCount int32
  4079  				err = json.Unmarshal(*v, &instanceCount)
  4080  				if err != nil {
  4081  					return err
  4082  				}
  4083  				dtsrp.InstanceCount = &instanceCount
  4084  			}
  4085  		case "status":
  4086  			if v != nil {
  4087  				var status ServiceStatus
  4088  				err = json.Unmarshal(*v, &status)
  4089  				if err != nil {
  4090  					return err
  4091  				}
  4092  				dtsrp.Status = status
  4093  			}
  4094  		case "serviceType":
  4095  			if v != nil {
  4096  				var serviceType ServiceTypeBasicServiceResourceProperties
  4097  				err = json.Unmarshal(*v, &serviceType)
  4098  				if err != nil {
  4099  					return err
  4100  				}
  4101  				dtsrp.ServiceType = serviceType
  4102  			}
  4103  		}
  4104  	}
  4105  
  4106  	return nil
  4107  }
  4108  
  4109  // ErrorResponse error Response.
  4110  type ErrorResponse struct {
  4111  	// Code - Error code.
  4112  	Code *string `json:"code,omitempty"`
  4113  	// Message - Error message indicating why the operation failed.
  4114  	Message *string `json:"message,omitempty"`
  4115  }
  4116  
  4117  // ExcludedPath ...
  4118  type ExcludedPath struct {
  4119  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  4120  	Path *string `json:"path,omitempty"`
  4121  }
  4122  
  4123  // ExtendedResourceProperties the system generated resource properties associated with SQL databases, SQL
  4124  // containers, Gremlin databases and Gremlin graphs.
  4125  type ExtendedResourceProperties struct {
  4126  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4127  	Rid *string `json:"_rid,omitempty"`
  4128  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4129  	Ts *float64 `json:"_ts,omitempty"`
  4130  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4131  	Etag *string `json:"_etag,omitempty"`
  4132  }
  4133  
  4134  // MarshalJSON is the custom marshaler for ExtendedResourceProperties.
  4135  func (erp ExtendedResourceProperties) MarshalJSON() ([]byte, error) {
  4136  	objectMap := make(map[string]interface{})
  4137  	return json.Marshal(objectMap)
  4138  }
  4139  
  4140  // FailoverPolicies the list of new failover policies for the failover priority change.
  4141  type FailoverPolicies struct {
  4142  	// FailoverPolicies - List of failover policies.
  4143  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  4144  }
  4145  
  4146  // FailoverPolicy the failover policy for a given region of a database account.
  4147  type FailoverPolicy struct {
  4148  	// ID - READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  4149  	ID *string `json:"id,omitempty"`
  4150  	// LocationName - The name of the region in which the database account exists.
  4151  	LocationName *string `json:"locationName,omitempty"`
  4152  	// 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.
  4153  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  4154  }
  4155  
  4156  // MarshalJSON is the custom marshaler for FailoverPolicy.
  4157  func (fp FailoverPolicy) MarshalJSON() ([]byte, error) {
  4158  	objectMap := make(map[string]interface{})
  4159  	if fp.LocationName != nil {
  4160  		objectMap["locationName"] = fp.LocationName
  4161  	}
  4162  	if fp.FailoverPriority != nil {
  4163  		objectMap["failoverPriority"] = fp.FailoverPriority
  4164  	}
  4165  	return json.Marshal(objectMap)
  4166  }
  4167  
  4168  // GraphAPIComputeRegionalServiceResource resource for a regional service location.
  4169  type GraphAPIComputeRegionalServiceResource struct {
  4170  	// GraphAPIComputeEndpoint - READ-ONLY; The regional endpoint for GraphAPICompute.
  4171  	GraphAPIComputeEndpoint *string `json:"graphApiComputeEndpoint,omitempty"`
  4172  	// Name - READ-ONLY; The regional service name.
  4173  	Name *string `json:"name,omitempty"`
  4174  	// Location - READ-ONLY; The location name.
  4175  	Location *string `json:"location,omitempty"`
  4176  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  4177  	Status ServiceStatus `json:"status,omitempty"`
  4178  }
  4179  
  4180  // MarshalJSON is the custom marshaler for GraphAPIComputeRegionalServiceResource.
  4181  func (gacrsr GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error) {
  4182  	objectMap := make(map[string]interface{})
  4183  	return json.Marshal(objectMap)
  4184  }
  4185  
  4186  // GraphAPIComputeServiceResource describes the service response property for GraphAPICompute.
  4187  type GraphAPIComputeServiceResource struct {
  4188  	Properties *GraphAPIComputeServiceResourceProperties `json:"properties,omitempty"`
  4189  }
  4190  
  4191  // GraphAPIComputeServiceResourceProperties properties for GraphAPIComputeServiceResource.
  4192  type GraphAPIComputeServiceResourceProperties struct {
  4193  	// GraphAPIComputeEndpoint - GraphAPICompute endpoint for the service.
  4194  	GraphAPIComputeEndpoint *string `json:"graphApiComputeEndpoint,omitempty"`
  4195  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
  4196  	Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"`
  4197  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  4198  	AdditionalProperties map[string]interface{} `json:""`
  4199  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  4200  	CreationTime *date.Time `json:"creationTime,omitempty"`
  4201  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
  4202  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  4203  	// InstanceCount - Instance count for the service.
  4204  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  4205  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  4206  	Status ServiceStatus `json:"status,omitempty"`
  4207  	// ServiceType - Possible values include: 'ServiceTypeServiceResourceProperties', 'ServiceTypeDataTransfer', 'ServiceTypeSQLDedicatedGateway', 'ServiceTypeGraphAPICompute', 'ServiceTypeMaterializedViewsBuilder'
  4208  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  4209  }
  4210  
  4211  // MarshalJSON is the custom marshaler for GraphAPIComputeServiceResourceProperties.
  4212  func (gacsrp GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) {
  4213  	gacsrp.ServiceType = ServiceTypeGraphAPICompute
  4214  	objectMap := make(map[string]interface{})
  4215  	if gacsrp.GraphAPIComputeEndpoint != nil {
  4216  		objectMap["graphApiComputeEndpoint"] = gacsrp.GraphAPIComputeEndpoint
  4217  	}
  4218  	if gacsrp.InstanceSize != "" {
  4219  		objectMap["instanceSize"] = gacsrp.InstanceSize
  4220  	}
  4221  	if gacsrp.InstanceCount != nil {
  4222  		objectMap["instanceCount"] = gacsrp.InstanceCount
  4223  	}
  4224  	if gacsrp.ServiceType != "" {
  4225  		objectMap["serviceType"] = gacsrp.ServiceType
  4226  	}
  4227  	for k, v := range gacsrp.AdditionalProperties {
  4228  		objectMap[k] = v
  4229  	}
  4230  	return json.Marshal(objectMap)
  4231  }
  4232  
  4233  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4234  func (gacsrp GraphAPIComputeServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  4235  	return nil, false
  4236  }
  4237  
  4238  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4239  func (gacsrp GraphAPIComputeServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  4240  	return nil, false
  4241  }
  4242  
  4243  // AsGraphAPIComputeServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4244  func (gacsrp GraphAPIComputeServiceResourceProperties) AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool) {
  4245  	return &gacsrp, true
  4246  }
  4247  
  4248  // AsMaterializedViewsBuilderServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4249  func (gacsrp GraphAPIComputeServiceResourceProperties) AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool) {
  4250  	return nil, false
  4251  }
  4252  
  4253  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4254  func (gacsrp GraphAPIComputeServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  4255  	return nil, false
  4256  }
  4257  
  4258  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for GraphAPIComputeServiceResourceProperties.
  4259  func (gacsrp GraphAPIComputeServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  4260  	return &gacsrp, true
  4261  }
  4262  
  4263  // UnmarshalJSON is the custom unmarshaler for GraphAPIComputeServiceResourceProperties struct.
  4264  func (gacsrp *GraphAPIComputeServiceResourceProperties) UnmarshalJSON(body []byte) error {
  4265  	var m map[string]*json.RawMessage
  4266  	err := json.Unmarshal(body, &m)
  4267  	if err != nil {
  4268  		return err
  4269  	}
  4270  	for k, v := range m {
  4271  		switch k {
  4272  		case "graphApiComputeEndpoint":
  4273  			if v != nil {
  4274  				var graphAPIComputeEndpoint string
  4275  				err = json.Unmarshal(*v, &graphAPIComputeEndpoint)
  4276  				if err != nil {
  4277  					return err
  4278  				}
  4279  				gacsrp.GraphAPIComputeEndpoint = &graphAPIComputeEndpoint
  4280  			}
  4281  		case "locations":
  4282  			if v != nil {
  4283  				var locations []GraphAPIComputeRegionalServiceResource
  4284  				err = json.Unmarshal(*v, &locations)
  4285  				if err != nil {
  4286  					return err
  4287  				}
  4288  				gacsrp.Locations = &locations
  4289  			}
  4290  		default:
  4291  			if v != nil {
  4292  				var additionalProperties interface{}
  4293  				err = json.Unmarshal(*v, &additionalProperties)
  4294  				if err != nil {
  4295  					return err
  4296  				}
  4297  				if gacsrp.AdditionalProperties == nil {
  4298  					gacsrp.AdditionalProperties = make(map[string]interface{})
  4299  				}
  4300  				gacsrp.AdditionalProperties[k] = additionalProperties
  4301  			}
  4302  		case "creationTime":
  4303  			if v != nil {
  4304  				var creationTime date.Time
  4305  				err = json.Unmarshal(*v, &creationTime)
  4306  				if err != nil {
  4307  					return err
  4308  				}
  4309  				gacsrp.CreationTime = &creationTime
  4310  			}
  4311  		case "instanceSize":
  4312  			if v != nil {
  4313  				var instanceSize ServiceSize
  4314  				err = json.Unmarshal(*v, &instanceSize)
  4315  				if err != nil {
  4316  					return err
  4317  				}
  4318  				gacsrp.InstanceSize = instanceSize
  4319  			}
  4320  		case "instanceCount":
  4321  			if v != nil {
  4322  				var instanceCount int32
  4323  				err = json.Unmarshal(*v, &instanceCount)
  4324  				if err != nil {
  4325  					return err
  4326  				}
  4327  				gacsrp.InstanceCount = &instanceCount
  4328  			}
  4329  		case "status":
  4330  			if v != nil {
  4331  				var status ServiceStatus
  4332  				err = json.Unmarshal(*v, &status)
  4333  				if err != nil {
  4334  					return err
  4335  				}
  4336  				gacsrp.Status = status
  4337  			}
  4338  		case "serviceType":
  4339  			if v != nil {
  4340  				var serviceType ServiceTypeBasicServiceResourceProperties
  4341  				err = json.Unmarshal(*v, &serviceType)
  4342  				if err != nil {
  4343  					return err
  4344  				}
  4345  				gacsrp.ServiceType = serviceType
  4346  			}
  4347  		}
  4348  	}
  4349  
  4350  	return nil
  4351  }
  4352  
  4353  // GremlinDatabaseCreateUpdateParameters parameters to create and update Cosmos DB Gremlin database.
  4354  type GremlinDatabaseCreateUpdateParameters struct {
  4355  	// GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
  4356  	*GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  4357  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4358  	ID *string `json:"id,omitempty"`
  4359  	// Name - READ-ONLY; The name of the ARM resource.
  4360  	Name *string `json:"name,omitempty"`
  4361  	// Type - READ-ONLY; The type of Azure resource.
  4362  	Type *string `json:"type,omitempty"`
  4363  	// Location - The location of the resource group to which the resource belongs.
  4364  	Location *string            `json:"location,omitempty"`
  4365  	Tags     map[string]*string `json:"tags"`
  4366  }
  4367  
  4368  // MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateParameters.
  4369  func (gdcup GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  4370  	objectMap := make(map[string]interface{})
  4371  	if gdcup.GremlinDatabaseCreateUpdateProperties != nil {
  4372  		objectMap["properties"] = gdcup.GremlinDatabaseCreateUpdateProperties
  4373  	}
  4374  	if gdcup.Location != nil {
  4375  		objectMap["location"] = gdcup.Location
  4376  	}
  4377  	if gdcup.Tags != nil {
  4378  		objectMap["tags"] = gdcup.Tags
  4379  	}
  4380  	return json.Marshal(objectMap)
  4381  }
  4382  
  4383  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseCreateUpdateParameters struct.
  4384  func (gdcup *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  4385  	var m map[string]*json.RawMessage
  4386  	err := json.Unmarshal(body, &m)
  4387  	if err != nil {
  4388  		return err
  4389  	}
  4390  	for k, v := range m {
  4391  		switch k {
  4392  		case "properties":
  4393  			if v != nil {
  4394  				var gremlinDatabaseCreateUpdateProperties GremlinDatabaseCreateUpdateProperties
  4395  				err = json.Unmarshal(*v, &gremlinDatabaseCreateUpdateProperties)
  4396  				if err != nil {
  4397  					return err
  4398  				}
  4399  				gdcup.GremlinDatabaseCreateUpdateProperties = &gremlinDatabaseCreateUpdateProperties
  4400  			}
  4401  		case "id":
  4402  			if v != nil {
  4403  				var ID string
  4404  				err = json.Unmarshal(*v, &ID)
  4405  				if err != nil {
  4406  					return err
  4407  				}
  4408  				gdcup.ID = &ID
  4409  			}
  4410  		case "name":
  4411  			if v != nil {
  4412  				var name string
  4413  				err = json.Unmarshal(*v, &name)
  4414  				if err != nil {
  4415  					return err
  4416  				}
  4417  				gdcup.Name = &name
  4418  			}
  4419  		case "type":
  4420  			if v != nil {
  4421  				var typeVar string
  4422  				err = json.Unmarshal(*v, &typeVar)
  4423  				if err != nil {
  4424  					return err
  4425  				}
  4426  				gdcup.Type = &typeVar
  4427  			}
  4428  		case "location":
  4429  			if v != nil {
  4430  				var location string
  4431  				err = json.Unmarshal(*v, &location)
  4432  				if err != nil {
  4433  					return err
  4434  				}
  4435  				gdcup.Location = &location
  4436  			}
  4437  		case "tags":
  4438  			if v != nil {
  4439  				var tags map[string]*string
  4440  				err = json.Unmarshal(*v, &tags)
  4441  				if err != nil {
  4442  					return err
  4443  				}
  4444  				gdcup.Tags = tags
  4445  			}
  4446  		}
  4447  	}
  4448  
  4449  	return nil
  4450  }
  4451  
  4452  // GremlinDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin database.
  4453  type GremlinDatabaseCreateUpdateProperties struct {
  4454  	// Resource - The standard JSON format of a Gremlin database
  4455  	Resource *GremlinDatabaseResource `json:"resource,omitempty"`
  4456  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4457  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4458  }
  4459  
  4460  // GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
  4461  type GremlinDatabaseGetProperties struct {
  4462  	Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"`
  4463  	Options  *GremlinDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  4464  }
  4465  
  4466  // GremlinDatabaseGetPropertiesOptions ...
  4467  type GremlinDatabaseGetPropertiesOptions struct {
  4468  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4469  	Throughput *int32 `json:"throughput,omitempty"`
  4470  	// AutoscaleSettings - Specifies the Autoscale settings.
  4471  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4472  }
  4473  
  4474  // GremlinDatabaseGetPropertiesResource ...
  4475  type GremlinDatabaseGetPropertiesResource struct {
  4476  	// ID - Name of the Cosmos DB Gremlin database
  4477  	ID *string `json:"id,omitempty"`
  4478  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4479  	Rid *string `json:"_rid,omitempty"`
  4480  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4481  	Ts *float64 `json:"_ts,omitempty"`
  4482  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4483  	Etag *string `json:"_etag,omitempty"`
  4484  }
  4485  
  4486  // MarshalJSON is the custom marshaler for GremlinDatabaseGetPropertiesResource.
  4487  func (gdgp GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4488  	objectMap := make(map[string]interface{})
  4489  	if gdgp.ID != nil {
  4490  		objectMap["id"] = gdgp.ID
  4491  	}
  4492  	return json.Marshal(objectMap)
  4493  }
  4494  
  4495  // GremlinDatabaseGetResults an Azure Cosmos DB Gremlin database.
  4496  type GremlinDatabaseGetResults struct {
  4497  	autorest.Response `json:"-"`
  4498  	// GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
  4499  	*GremlinDatabaseGetProperties `json:"properties,omitempty"`
  4500  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4501  	ID *string `json:"id,omitempty"`
  4502  	// Name - READ-ONLY; The name of the ARM resource.
  4503  	Name *string `json:"name,omitempty"`
  4504  	// Type - READ-ONLY; The type of Azure resource.
  4505  	Type *string `json:"type,omitempty"`
  4506  	// Location - The location of the resource group to which the resource belongs.
  4507  	Location *string            `json:"location,omitempty"`
  4508  	Tags     map[string]*string `json:"tags"`
  4509  }
  4510  
  4511  // MarshalJSON is the custom marshaler for GremlinDatabaseGetResults.
  4512  func (gdgr GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) {
  4513  	objectMap := make(map[string]interface{})
  4514  	if gdgr.GremlinDatabaseGetProperties != nil {
  4515  		objectMap["properties"] = gdgr.GremlinDatabaseGetProperties
  4516  	}
  4517  	if gdgr.Location != nil {
  4518  		objectMap["location"] = gdgr.Location
  4519  	}
  4520  	if gdgr.Tags != nil {
  4521  		objectMap["tags"] = gdgr.Tags
  4522  	}
  4523  	return json.Marshal(objectMap)
  4524  }
  4525  
  4526  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseGetResults struct.
  4527  func (gdgr *GremlinDatabaseGetResults) UnmarshalJSON(body []byte) error {
  4528  	var m map[string]*json.RawMessage
  4529  	err := json.Unmarshal(body, &m)
  4530  	if err != nil {
  4531  		return err
  4532  	}
  4533  	for k, v := range m {
  4534  		switch k {
  4535  		case "properties":
  4536  			if v != nil {
  4537  				var gremlinDatabaseGetProperties GremlinDatabaseGetProperties
  4538  				err = json.Unmarshal(*v, &gremlinDatabaseGetProperties)
  4539  				if err != nil {
  4540  					return err
  4541  				}
  4542  				gdgr.GremlinDatabaseGetProperties = &gremlinDatabaseGetProperties
  4543  			}
  4544  		case "id":
  4545  			if v != nil {
  4546  				var ID string
  4547  				err = json.Unmarshal(*v, &ID)
  4548  				if err != nil {
  4549  					return err
  4550  				}
  4551  				gdgr.ID = &ID
  4552  			}
  4553  		case "name":
  4554  			if v != nil {
  4555  				var name string
  4556  				err = json.Unmarshal(*v, &name)
  4557  				if err != nil {
  4558  					return err
  4559  				}
  4560  				gdgr.Name = &name
  4561  			}
  4562  		case "type":
  4563  			if v != nil {
  4564  				var typeVar string
  4565  				err = json.Unmarshal(*v, &typeVar)
  4566  				if err != nil {
  4567  					return err
  4568  				}
  4569  				gdgr.Type = &typeVar
  4570  			}
  4571  		case "location":
  4572  			if v != nil {
  4573  				var location string
  4574  				err = json.Unmarshal(*v, &location)
  4575  				if err != nil {
  4576  					return err
  4577  				}
  4578  				gdgr.Location = &location
  4579  			}
  4580  		case "tags":
  4581  			if v != nil {
  4582  				var tags map[string]*string
  4583  				err = json.Unmarshal(*v, &tags)
  4584  				if err != nil {
  4585  					return err
  4586  				}
  4587  				gdgr.Tags = tags
  4588  			}
  4589  		}
  4590  	}
  4591  
  4592  	return nil
  4593  }
  4594  
  4595  // GremlinDatabaseListResult the List operation response, that contains the Gremlin databases and their
  4596  // properties.
  4597  type GremlinDatabaseListResult struct {
  4598  	autorest.Response `json:"-"`
  4599  	// Value - READ-ONLY; List of Gremlin databases and their properties.
  4600  	Value *[]GremlinDatabaseGetResults `json:"value,omitempty"`
  4601  }
  4602  
  4603  // MarshalJSON is the custom marshaler for GremlinDatabaseListResult.
  4604  func (gdlr GremlinDatabaseListResult) MarshalJSON() ([]byte, error) {
  4605  	objectMap := make(map[string]interface{})
  4606  	return json.Marshal(objectMap)
  4607  }
  4608  
  4609  // GremlinDatabaseResource cosmos DB Gremlin database resource object
  4610  type GremlinDatabaseResource struct {
  4611  	// ID - Name of the Cosmos DB Gremlin database
  4612  	ID *string `json:"id,omitempty"`
  4613  }
  4614  
  4615  // GremlinGraphCreateUpdateParameters parameters to create and update Cosmos DB Gremlin graph.
  4616  type GremlinGraphCreateUpdateParameters struct {
  4617  	// GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
  4618  	*GremlinGraphCreateUpdateProperties `json:"properties,omitempty"`
  4619  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4620  	ID *string `json:"id,omitempty"`
  4621  	// Name - READ-ONLY; The name of the ARM resource.
  4622  	Name *string `json:"name,omitempty"`
  4623  	// Type - READ-ONLY; The type of Azure resource.
  4624  	Type *string `json:"type,omitempty"`
  4625  	// Location - The location of the resource group to which the resource belongs.
  4626  	Location *string            `json:"location,omitempty"`
  4627  	Tags     map[string]*string `json:"tags"`
  4628  }
  4629  
  4630  // MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateParameters.
  4631  func (ggcup GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  4632  	objectMap := make(map[string]interface{})
  4633  	if ggcup.GremlinGraphCreateUpdateProperties != nil {
  4634  		objectMap["properties"] = ggcup.GremlinGraphCreateUpdateProperties
  4635  	}
  4636  	if ggcup.Location != nil {
  4637  		objectMap["location"] = ggcup.Location
  4638  	}
  4639  	if ggcup.Tags != nil {
  4640  		objectMap["tags"] = ggcup.Tags
  4641  	}
  4642  	return json.Marshal(objectMap)
  4643  }
  4644  
  4645  // UnmarshalJSON is the custom unmarshaler for GremlinGraphCreateUpdateParameters struct.
  4646  func (ggcup *GremlinGraphCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  4647  	var m map[string]*json.RawMessage
  4648  	err := json.Unmarshal(body, &m)
  4649  	if err != nil {
  4650  		return err
  4651  	}
  4652  	for k, v := range m {
  4653  		switch k {
  4654  		case "properties":
  4655  			if v != nil {
  4656  				var gremlinGraphCreateUpdateProperties GremlinGraphCreateUpdateProperties
  4657  				err = json.Unmarshal(*v, &gremlinGraphCreateUpdateProperties)
  4658  				if err != nil {
  4659  					return err
  4660  				}
  4661  				ggcup.GremlinGraphCreateUpdateProperties = &gremlinGraphCreateUpdateProperties
  4662  			}
  4663  		case "id":
  4664  			if v != nil {
  4665  				var ID string
  4666  				err = json.Unmarshal(*v, &ID)
  4667  				if err != nil {
  4668  					return err
  4669  				}
  4670  				ggcup.ID = &ID
  4671  			}
  4672  		case "name":
  4673  			if v != nil {
  4674  				var name string
  4675  				err = json.Unmarshal(*v, &name)
  4676  				if err != nil {
  4677  					return err
  4678  				}
  4679  				ggcup.Name = &name
  4680  			}
  4681  		case "type":
  4682  			if v != nil {
  4683  				var typeVar string
  4684  				err = json.Unmarshal(*v, &typeVar)
  4685  				if err != nil {
  4686  					return err
  4687  				}
  4688  				ggcup.Type = &typeVar
  4689  			}
  4690  		case "location":
  4691  			if v != nil {
  4692  				var location string
  4693  				err = json.Unmarshal(*v, &location)
  4694  				if err != nil {
  4695  					return err
  4696  				}
  4697  				ggcup.Location = &location
  4698  			}
  4699  		case "tags":
  4700  			if v != nil {
  4701  				var tags map[string]*string
  4702  				err = json.Unmarshal(*v, &tags)
  4703  				if err != nil {
  4704  					return err
  4705  				}
  4706  				ggcup.Tags = tags
  4707  			}
  4708  		}
  4709  	}
  4710  
  4711  	return nil
  4712  }
  4713  
  4714  // GremlinGraphCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin graph.
  4715  type GremlinGraphCreateUpdateProperties struct {
  4716  	// Resource - The standard JSON format of a Gremlin graph
  4717  	Resource *GremlinGraphResource `json:"resource,omitempty"`
  4718  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4719  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4720  }
  4721  
  4722  // GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph
  4723  type GremlinGraphGetProperties struct {
  4724  	Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"`
  4725  	Options  *GremlinGraphGetPropertiesOptions  `json:"options,omitempty"`
  4726  }
  4727  
  4728  // GremlinGraphGetPropertiesOptions ...
  4729  type GremlinGraphGetPropertiesOptions struct {
  4730  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4731  	Throughput *int32 `json:"throughput,omitempty"`
  4732  	// AutoscaleSettings - Specifies the Autoscale settings.
  4733  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4734  }
  4735  
  4736  // GremlinGraphGetPropertiesResource ...
  4737  type GremlinGraphGetPropertiesResource struct {
  4738  	// ID - Name of the Cosmos DB Gremlin graph
  4739  	ID *string `json:"id,omitempty"`
  4740  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4741  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4742  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4743  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4744  	// DefaultTTL - Default time to live
  4745  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4746  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4747  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4748  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4749  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4750  	// AnalyticalStorageTTL - Analytical TTL.
  4751  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  4752  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4753  	Rid *string `json:"_rid,omitempty"`
  4754  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4755  	Ts *float64 `json:"_ts,omitempty"`
  4756  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4757  	Etag *string `json:"_etag,omitempty"`
  4758  }
  4759  
  4760  // MarshalJSON is the custom marshaler for GremlinGraphGetPropertiesResource.
  4761  func (gggp GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4762  	objectMap := make(map[string]interface{})
  4763  	if gggp.ID != nil {
  4764  		objectMap["id"] = gggp.ID
  4765  	}
  4766  	if gggp.IndexingPolicy != nil {
  4767  		objectMap["indexingPolicy"] = gggp.IndexingPolicy
  4768  	}
  4769  	if gggp.PartitionKey != nil {
  4770  		objectMap["partitionKey"] = gggp.PartitionKey
  4771  	}
  4772  	if gggp.DefaultTTL != nil {
  4773  		objectMap["defaultTtl"] = gggp.DefaultTTL
  4774  	}
  4775  	if gggp.UniqueKeyPolicy != nil {
  4776  		objectMap["uniqueKeyPolicy"] = gggp.UniqueKeyPolicy
  4777  	}
  4778  	if gggp.ConflictResolutionPolicy != nil {
  4779  		objectMap["conflictResolutionPolicy"] = gggp.ConflictResolutionPolicy
  4780  	}
  4781  	if gggp.AnalyticalStorageTTL != nil {
  4782  		objectMap["analyticalStorageTtl"] = gggp.AnalyticalStorageTTL
  4783  	}
  4784  	return json.Marshal(objectMap)
  4785  }
  4786  
  4787  // GremlinGraphGetResults an Azure Cosmos DB Gremlin graph.
  4788  type GremlinGraphGetResults struct {
  4789  	autorest.Response `json:"-"`
  4790  	// GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph
  4791  	*GremlinGraphGetProperties `json:"properties,omitempty"`
  4792  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4793  	ID *string `json:"id,omitempty"`
  4794  	// Name - READ-ONLY; The name of the ARM resource.
  4795  	Name *string `json:"name,omitempty"`
  4796  	// Type - READ-ONLY; The type of Azure resource.
  4797  	Type *string `json:"type,omitempty"`
  4798  	// Location - The location of the resource group to which the resource belongs.
  4799  	Location *string            `json:"location,omitempty"`
  4800  	Tags     map[string]*string `json:"tags"`
  4801  }
  4802  
  4803  // MarshalJSON is the custom marshaler for GremlinGraphGetResults.
  4804  func (gggr GremlinGraphGetResults) MarshalJSON() ([]byte, error) {
  4805  	objectMap := make(map[string]interface{})
  4806  	if gggr.GremlinGraphGetProperties != nil {
  4807  		objectMap["properties"] = gggr.GremlinGraphGetProperties
  4808  	}
  4809  	if gggr.Location != nil {
  4810  		objectMap["location"] = gggr.Location
  4811  	}
  4812  	if gggr.Tags != nil {
  4813  		objectMap["tags"] = gggr.Tags
  4814  	}
  4815  	return json.Marshal(objectMap)
  4816  }
  4817  
  4818  // UnmarshalJSON is the custom unmarshaler for GremlinGraphGetResults struct.
  4819  func (gggr *GremlinGraphGetResults) UnmarshalJSON(body []byte) error {
  4820  	var m map[string]*json.RawMessage
  4821  	err := json.Unmarshal(body, &m)
  4822  	if err != nil {
  4823  		return err
  4824  	}
  4825  	for k, v := range m {
  4826  		switch k {
  4827  		case "properties":
  4828  			if v != nil {
  4829  				var gremlinGraphGetProperties GremlinGraphGetProperties
  4830  				err = json.Unmarshal(*v, &gremlinGraphGetProperties)
  4831  				if err != nil {
  4832  					return err
  4833  				}
  4834  				gggr.GremlinGraphGetProperties = &gremlinGraphGetProperties
  4835  			}
  4836  		case "id":
  4837  			if v != nil {
  4838  				var ID string
  4839  				err = json.Unmarshal(*v, &ID)
  4840  				if err != nil {
  4841  					return err
  4842  				}
  4843  				gggr.ID = &ID
  4844  			}
  4845  		case "name":
  4846  			if v != nil {
  4847  				var name string
  4848  				err = json.Unmarshal(*v, &name)
  4849  				if err != nil {
  4850  					return err
  4851  				}
  4852  				gggr.Name = &name
  4853  			}
  4854  		case "type":
  4855  			if v != nil {
  4856  				var typeVar string
  4857  				err = json.Unmarshal(*v, &typeVar)
  4858  				if err != nil {
  4859  					return err
  4860  				}
  4861  				gggr.Type = &typeVar
  4862  			}
  4863  		case "location":
  4864  			if v != nil {
  4865  				var location string
  4866  				err = json.Unmarshal(*v, &location)
  4867  				if err != nil {
  4868  					return err
  4869  				}
  4870  				gggr.Location = &location
  4871  			}
  4872  		case "tags":
  4873  			if v != nil {
  4874  				var tags map[string]*string
  4875  				err = json.Unmarshal(*v, &tags)
  4876  				if err != nil {
  4877  					return err
  4878  				}
  4879  				gggr.Tags = tags
  4880  			}
  4881  		}
  4882  	}
  4883  
  4884  	return nil
  4885  }
  4886  
  4887  // GremlinGraphListResult the List operation response, that contains the graphs and their properties.
  4888  type GremlinGraphListResult struct {
  4889  	autorest.Response `json:"-"`
  4890  	// Value - READ-ONLY; List of graphs and their properties.
  4891  	Value *[]GremlinGraphGetResults `json:"value,omitempty"`
  4892  }
  4893  
  4894  // MarshalJSON is the custom marshaler for GremlinGraphListResult.
  4895  func (gglr GremlinGraphListResult) MarshalJSON() ([]byte, error) {
  4896  	objectMap := make(map[string]interface{})
  4897  	return json.Marshal(objectMap)
  4898  }
  4899  
  4900  // GremlinGraphResource cosmos DB Gremlin graph resource object
  4901  type GremlinGraphResource struct {
  4902  	// ID - Name of the Cosmos DB Gremlin graph
  4903  	ID *string `json:"id,omitempty"`
  4904  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4905  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4906  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4907  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4908  	// DefaultTTL - Default time to live
  4909  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4910  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4911  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4912  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4913  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4914  	// AnalyticalStorageTTL - Analytical TTL.
  4915  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  4916  }
  4917  
  4918  // GremlinResourcesCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the
  4919  // results of a long-running operation.
  4920  type GremlinResourcesCreateUpdateGremlinDatabaseFuture struct {
  4921  	azure.FutureAPI
  4922  	// Result returns the result of the asynchronous operation.
  4923  	// If the operation has not completed it will return an error.
  4924  	Result func(GremlinResourcesClient) (GremlinDatabaseGetResults, error)
  4925  }
  4926  
  4927  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4928  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  4929  	var azFuture azure.Future
  4930  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4931  		return err
  4932  	}
  4933  	future.FutureAPI = &azFuture
  4934  	future.Result = future.result
  4935  	return nil
  4936  }
  4937  
  4938  // result is the default implementation for GremlinResourcesCreateUpdateGremlinDatabaseFuture.Result.
  4939  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) result(client GremlinResourcesClient) (gdgr GremlinDatabaseGetResults, err error) {
  4940  	var done bool
  4941  	done, err = future.DoneWithContext(context.Background(), client)
  4942  	if err != nil {
  4943  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  4944  		return
  4945  	}
  4946  	if !done {
  4947  		gdgr.Response.Response = future.Response()
  4948  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture")
  4949  		return
  4950  	}
  4951  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4952  	if gdgr.Response.Response, err = future.GetResult(sender); err == nil && gdgr.Response.Response.StatusCode != http.StatusNoContent {
  4953  		gdgr, err = client.CreateUpdateGremlinDatabaseResponder(gdgr.Response.Response)
  4954  		if err != nil {
  4955  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", gdgr.Response.Response, "Failure responding to request")
  4956  		}
  4957  	}
  4958  	return
  4959  }
  4960  
  4961  // GremlinResourcesCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results
  4962  // of a long-running operation.
  4963  type GremlinResourcesCreateUpdateGremlinGraphFuture struct {
  4964  	azure.FutureAPI
  4965  	// Result returns the result of the asynchronous operation.
  4966  	// If the operation has not completed it will return an error.
  4967  	Result func(GremlinResourcesClient) (GremlinGraphGetResults, error)
  4968  }
  4969  
  4970  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4971  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  4972  	var azFuture azure.Future
  4973  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4974  		return err
  4975  	}
  4976  	future.FutureAPI = &azFuture
  4977  	future.Result = future.result
  4978  	return nil
  4979  }
  4980  
  4981  // result is the default implementation for GremlinResourcesCreateUpdateGremlinGraphFuture.Result.
  4982  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) result(client GremlinResourcesClient) (gggr GremlinGraphGetResults, err error) {
  4983  	var done bool
  4984  	done, err = future.DoneWithContext(context.Background(), client)
  4985  	if err != nil {
  4986  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  4987  		return
  4988  	}
  4989  	if !done {
  4990  		gggr.Response.Response = future.Response()
  4991  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture")
  4992  		return
  4993  	}
  4994  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4995  	if gggr.Response.Response, err = future.GetResult(sender); err == nil && gggr.Response.Response.StatusCode != http.StatusNoContent {
  4996  		gggr, err = client.CreateUpdateGremlinGraphResponder(gggr.Response.Response)
  4997  		if err != nil {
  4998  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", gggr.Response.Response, "Failure responding to request")
  4999  		}
  5000  	}
  5001  	return
  5002  }
  5003  
  5004  // GremlinResourcesDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of
  5005  // a long-running operation.
  5006  type GremlinResourcesDeleteGremlinDatabaseFuture struct {
  5007  	azure.FutureAPI
  5008  	// Result returns the result of the asynchronous operation.
  5009  	// If the operation has not completed it will return an error.
  5010  	Result func(GremlinResourcesClient) (autorest.Response, error)
  5011  }
  5012  
  5013  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5014  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  5015  	var azFuture azure.Future
  5016  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5017  		return err
  5018  	}
  5019  	future.FutureAPI = &azFuture
  5020  	future.Result = future.result
  5021  	return nil
  5022  }
  5023  
  5024  // result is the default implementation for GremlinResourcesDeleteGremlinDatabaseFuture.Result.
  5025  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  5026  	var done bool
  5027  	done, err = future.DoneWithContext(context.Background(), client)
  5028  	if err != nil {
  5029  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  5030  		return
  5031  	}
  5032  	if !done {
  5033  		ar.Response = future.Response()
  5034  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinDatabaseFuture")
  5035  		return
  5036  	}
  5037  	ar.Response = future.Response()
  5038  	return
  5039  }
  5040  
  5041  // GremlinResourcesDeleteGremlinGraphFuture an abstraction for monitoring and retrieving the results of a
  5042  // long-running operation.
  5043  type GremlinResourcesDeleteGremlinGraphFuture struct {
  5044  	azure.FutureAPI
  5045  	// Result returns the result of the asynchronous operation.
  5046  	// If the operation has not completed it will return an error.
  5047  	Result func(GremlinResourcesClient) (autorest.Response, error)
  5048  }
  5049  
  5050  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5051  func (future *GremlinResourcesDeleteGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  5052  	var azFuture azure.Future
  5053  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5054  		return err
  5055  	}
  5056  	future.FutureAPI = &azFuture
  5057  	future.Result = future.result
  5058  	return nil
  5059  }
  5060  
  5061  // result is the default implementation for GremlinResourcesDeleteGremlinGraphFuture.Result.
  5062  func (future *GremlinResourcesDeleteGremlinGraphFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  5063  	var done bool
  5064  	done, err = future.DoneWithContext(context.Background(), client)
  5065  	if err != nil {
  5066  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  5067  		return
  5068  	}
  5069  	if !done {
  5070  		ar.Response = future.Response()
  5071  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinGraphFuture")
  5072  		return
  5073  	}
  5074  	ar.Response = future.Response()
  5075  	return
  5076  }
  5077  
  5078  // GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  5079  // results of a long-running operation.
  5080  type GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture struct {
  5081  	azure.FutureAPI
  5082  	// Result returns the result of the asynchronous operation.
  5083  	// If the operation has not completed it will return an error.
  5084  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5085  }
  5086  
  5087  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5088  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  5089  	var azFuture azure.Future
  5090  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5091  		return err
  5092  	}
  5093  	future.FutureAPI = &azFuture
  5094  	future.Result = future.result
  5095  	return nil
  5096  }
  5097  
  5098  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture.Result.
  5099  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5100  	var done bool
  5101  	done, err = future.DoneWithContext(context.Background(), client)
  5102  	if err != nil {
  5103  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  5104  		return
  5105  	}
  5106  	if !done {
  5107  		tsgr.Response.Response = future.Response()
  5108  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture")
  5109  		return
  5110  	}
  5111  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5112  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5113  		tsgr, err = client.MigrateGremlinDatabaseToAutoscaleResponder(tsgr.Response.Response)
  5114  		if err != nil {
  5115  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5116  		}
  5117  	}
  5118  	return
  5119  }
  5120  
  5121  // GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture an abstraction for monitoring and
  5122  // retrieving the results of a long-running operation.
  5123  type GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture struct {
  5124  	azure.FutureAPI
  5125  	// Result returns the result of the asynchronous operation.
  5126  	// If the operation has not completed it will return an error.
  5127  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5128  }
  5129  
  5130  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5131  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  5132  	var azFuture azure.Future
  5133  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5134  		return err
  5135  	}
  5136  	future.FutureAPI = &azFuture
  5137  	future.Result = future.result
  5138  	return nil
  5139  }
  5140  
  5141  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture.Result.
  5142  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5143  	var done bool
  5144  	done, err = future.DoneWithContext(context.Background(), client)
  5145  	if err != nil {
  5146  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  5147  		return
  5148  	}
  5149  	if !done {
  5150  		tsgr.Response.Response = future.Response()
  5151  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture")
  5152  		return
  5153  	}
  5154  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5155  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5156  		tsgr, err = client.MigrateGremlinDatabaseToManualThroughputResponder(tsgr.Response.Response)
  5157  		if err != nil {
  5158  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5159  		}
  5160  	}
  5161  	return
  5162  }
  5163  
  5164  // GremlinResourcesMigrateGremlinGraphToAutoscaleFuture an abstraction for monitoring and retrieving the
  5165  // results of a long-running operation.
  5166  type GremlinResourcesMigrateGremlinGraphToAutoscaleFuture struct {
  5167  	azure.FutureAPI
  5168  	// Result returns the result of the asynchronous operation.
  5169  	// If the operation has not completed it will return an error.
  5170  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5171  }
  5172  
  5173  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5174  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  5175  	var azFuture azure.Future
  5176  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5177  		return err
  5178  	}
  5179  	future.FutureAPI = &azFuture
  5180  	future.Result = future.result
  5181  	return nil
  5182  }
  5183  
  5184  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToAutoscaleFuture.Result.
  5185  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5186  	var done bool
  5187  	done, err = future.DoneWithContext(context.Background(), client)
  5188  	if err != nil {
  5189  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  5190  		return
  5191  	}
  5192  	if !done {
  5193  		tsgr.Response.Response = future.Response()
  5194  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture")
  5195  		return
  5196  	}
  5197  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5198  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5199  		tsgr, err = client.MigrateGremlinGraphToAutoscaleResponder(tsgr.Response.Response)
  5200  		if err != nil {
  5201  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5202  		}
  5203  	}
  5204  	return
  5205  }
  5206  
  5207  // GremlinResourcesMigrateGremlinGraphToManualThroughputFuture an abstraction for monitoring and retrieving
  5208  // the results of a long-running operation.
  5209  type GremlinResourcesMigrateGremlinGraphToManualThroughputFuture struct {
  5210  	azure.FutureAPI
  5211  	// Result returns the result of the asynchronous operation.
  5212  	// If the operation has not completed it will return an error.
  5213  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5214  }
  5215  
  5216  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5217  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  5218  	var azFuture azure.Future
  5219  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5220  		return err
  5221  	}
  5222  	future.FutureAPI = &azFuture
  5223  	future.Result = future.result
  5224  	return nil
  5225  }
  5226  
  5227  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToManualThroughputFuture.Result.
  5228  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5229  	var done bool
  5230  	done, err = future.DoneWithContext(context.Background(), client)
  5231  	if err != nil {
  5232  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  5233  		return
  5234  	}
  5235  	if !done {
  5236  		tsgr.Response.Response = future.Response()
  5237  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture")
  5238  		return
  5239  	}
  5240  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5241  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5242  		tsgr, err = client.MigrateGremlinGraphToManualThroughputResponder(tsgr.Response.Response)
  5243  		if err != nil {
  5244  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5245  		}
  5246  	}
  5247  	return
  5248  }
  5249  
  5250  // GremlinResourcesUpdateGremlinDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  5251  // results of a long-running operation.
  5252  type GremlinResourcesUpdateGremlinDatabaseThroughputFuture struct {
  5253  	azure.FutureAPI
  5254  	// Result returns the result of the asynchronous operation.
  5255  	// If the operation has not completed it will return an error.
  5256  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5257  }
  5258  
  5259  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5260  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  5261  	var azFuture azure.Future
  5262  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5263  		return err
  5264  	}
  5265  	future.FutureAPI = &azFuture
  5266  	future.Result = future.result
  5267  	return nil
  5268  }
  5269  
  5270  // result is the default implementation for GremlinResourcesUpdateGremlinDatabaseThroughputFuture.Result.
  5271  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5272  	var done bool
  5273  	done, err = future.DoneWithContext(context.Background(), client)
  5274  	if err != nil {
  5275  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  5276  		return
  5277  	}
  5278  	if !done {
  5279  		tsgr.Response.Response = future.Response()
  5280  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture")
  5281  		return
  5282  	}
  5283  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5284  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5285  		tsgr, err = client.UpdateGremlinDatabaseThroughputResponder(tsgr.Response.Response)
  5286  		if err != nil {
  5287  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5288  		}
  5289  	}
  5290  	return
  5291  }
  5292  
  5293  // GremlinResourcesUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the
  5294  // results of a long-running operation.
  5295  type GremlinResourcesUpdateGremlinGraphThroughputFuture struct {
  5296  	azure.FutureAPI
  5297  	// Result returns the result of the asynchronous operation.
  5298  	// If the operation has not completed it will return an error.
  5299  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  5300  }
  5301  
  5302  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5303  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) UnmarshalJSON(body []byte) error {
  5304  	var azFuture azure.Future
  5305  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5306  		return err
  5307  	}
  5308  	future.FutureAPI = &azFuture
  5309  	future.Result = future.result
  5310  	return nil
  5311  }
  5312  
  5313  // result is the default implementation for GremlinResourcesUpdateGremlinGraphThroughputFuture.Result.
  5314  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5315  	var done bool
  5316  	done, err = future.DoneWithContext(context.Background(), client)
  5317  	if err != nil {
  5318  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", future.Response(), "Polling failure")
  5319  		return
  5320  	}
  5321  	if !done {
  5322  		tsgr.Response.Response = future.Response()
  5323  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture")
  5324  		return
  5325  	}
  5326  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5327  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  5328  		tsgr, err = client.UpdateGremlinGraphThroughputResponder(tsgr.Response.Response)
  5329  		if err != nil {
  5330  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  5331  		}
  5332  	}
  5333  	return
  5334  }
  5335  
  5336  // IncludedPath the paths that are included in indexing
  5337  type IncludedPath struct {
  5338  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  5339  	Path *string `json:"path,omitempty"`
  5340  	// Indexes - List of indexes for this path
  5341  	Indexes *[]Indexes `json:"indexes,omitempty"`
  5342  }
  5343  
  5344  // Indexes the indexes for the path.
  5345  type Indexes struct {
  5346  	// DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'String', 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon'
  5347  	DataType DataType `json:"dataType,omitempty"`
  5348  	// Precision - The precision of the index. -1 is maximum precision.
  5349  	Precision *int32 `json:"precision,omitempty"`
  5350  	// Kind - Indicates the type of index. Possible values include: 'Hash', 'Range', 'Spatial'
  5351  	Kind IndexKind `json:"kind,omitempty"`
  5352  }
  5353  
  5354  // IndexingPolicy cosmos DB indexing policy
  5355  type IndexingPolicy struct {
  5356  	// Automatic - Indicates if the indexing policy is automatic
  5357  	Automatic *bool `json:"automatic,omitempty"`
  5358  	// IndexingMode - Indicates the indexing mode. Possible values include: 'Consistent', 'Lazy', 'None'
  5359  	IndexingMode IndexingMode `json:"indexingMode,omitempty"`
  5360  	// IncludedPaths - List of paths to include in the indexing
  5361  	IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"`
  5362  	// ExcludedPaths - List of paths to exclude from indexing
  5363  	ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"`
  5364  	// CompositeIndexes - List of composite path list
  5365  	CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"`
  5366  	// SpatialIndexes - List of spatial specifics
  5367  	SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"`
  5368  }
  5369  
  5370  // IPAddressOrRange ipAddressOrRange object
  5371  type IPAddressOrRange struct {
  5372  	// 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”.
  5373  	IPAddressOrRange *string `json:"ipAddressOrRange,omitempty"`
  5374  }
  5375  
  5376  // ListClusters list of managed Cassandra clusters.
  5377  type ListClusters struct {
  5378  	autorest.Response `json:"-"`
  5379  	// Value - Container for the array of clusters.
  5380  	Value *[]ClusterResource `json:"value,omitempty"`
  5381  }
  5382  
  5383  // ListDataCenters list of managed Cassandra data centers and their properties.
  5384  type ListDataCenters struct {
  5385  	autorest.Response `json:"-"`
  5386  	// Value - READ-ONLY; Container for array of data centers.
  5387  	Value *[]DataCenterResource `json:"value,omitempty"`
  5388  }
  5389  
  5390  // MarshalJSON is the custom marshaler for ListDataCenters.
  5391  func (ldc ListDataCenters) MarshalJSON() ([]byte, error) {
  5392  	objectMap := make(map[string]interface{})
  5393  	return json.Marshal(objectMap)
  5394  }
  5395  
  5396  // Location a region in which the Azure Cosmos DB database account is deployed.
  5397  type Location struct {
  5398  	// ID - READ-ONLY; The unique identifier of the region within the database account. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  5399  	ID *string `json:"id,omitempty"`
  5400  	// LocationName - The name of the region.
  5401  	LocationName *string `json:"locationName,omitempty"`
  5402  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the specific region. Example: https://&lt;accountName&gt;-&lt;locationName&gt;.documents.azure.com:443/
  5403  	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
  5404  	ProvisioningState *string `json:"provisioningState,omitempty"`
  5405  	// 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.
  5406  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  5407  	// IsZoneRedundant - Flag to indicate whether or not this region is an AvailabilityZone region
  5408  	IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"`
  5409  }
  5410  
  5411  // MarshalJSON is the custom marshaler for Location.
  5412  func (l Location) MarshalJSON() ([]byte, error) {
  5413  	objectMap := make(map[string]interface{})
  5414  	if l.LocationName != nil {
  5415  		objectMap["locationName"] = l.LocationName
  5416  	}
  5417  	if l.ProvisioningState != nil {
  5418  		objectMap["provisioningState"] = l.ProvisioningState
  5419  	}
  5420  	if l.FailoverPriority != nil {
  5421  		objectMap["failoverPriority"] = l.FailoverPriority
  5422  	}
  5423  	if l.IsZoneRedundant != nil {
  5424  		objectMap["isZoneRedundant"] = l.IsZoneRedundant
  5425  	}
  5426  	return json.Marshal(objectMap)
  5427  }
  5428  
  5429  // LocationGetResult cosmos DB location get result
  5430  type LocationGetResult struct {
  5431  	autorest.Response `json:"-"`
  5432  	// Properties - Cosmos DB location metadata
  5433  	Properties *LocationProperties `json:"properties,omitempty"`
  5434  	// ID - READ-ONLY; The unique resource identifier of the database account.
  5435  	ID *string `json:"id,omitempty"`
  5436  	// Name - READ-ONLY; The name of the database account.
  5437  	Name *string `json:"name,omitempty"`
  5438  	// Type - READ-ONLY; The type of Azure resource.
  5439  	Type *string `json:"type,omitempty"`
  5440  }
  5441  
  5442  // MarshalJSON is the custom marshaler for LocationGetResult.
  5443  func (lgr LocationGetResult) MarshalJSON() ([]byte, error) {
  5444  	objectMap := make(map[string]interface{})
  5445  	if lgr.Properties != nil {
  5446  		objectMap["properties"] = lgr.Properties
  5447  	}
  5448  	return json.Marshal(objectMap)
  5449  }
  5450  
  5451  // LocationListResult the List operation response, that contains Cosmos DB locations and their properties.
  5452  type LocationListResult struct {
  5453  	autorest.Response `json:"-"`
  5454  	// Value - READ-ONLY; List of Cosmos DB locations and their properties.
  5455  	Value *[]LocationGetResult `json:"value,omitempty"`
  5456  }
  5457  
  5458  // MarshalJSON is the custom marshaler for LocationListResult.
  5459  func (llr LocationListResult) MarshalJSON() ([]byte, error) {
  5460  	objectMap := make(map[string]interface{})
  5461  	return json.Marshal(objectMap)
  5462  }
  5463  
  5464  // LocationProperties cosmos DB location metadata
  5465  type LocationProperties struct {
  5466  	// SupportsAvailabilityZone - READ-ONLY; Flag indicating whether the location supports availability zones or not.
  5467  	SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty"`
  5468  	// IsResidencyRestricted - READ-ONLY; Flag indicating whether the location is residency sensitive.
  5469  	IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty"`
  5470  	// BackupStorageRedundancies - READ-ONLY; The properties of available backup storage redundancies.
  5471  	BackupStorageRedundancies *[]BackupStorageRedundancy `json:"backupStorageRedundancies,omitempty"`
  5472  }
  5473  
  5474  // MarshalJSON is the custom marshaler for LocationProperties.
  5475  func (lp LocationProperties) MarshalJSON() ([]byte, error) {
  5476  	objectMap := make(map[string]interface{})
  5477  	return json.Marshal(objectMap)
  5478  }
  5479  
  5480  // ManagedCassandraARMResourceProperties the core properties of ARM resources.
  5481  type ManagedCassandraARMResourceProperties struct {
  5482  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5483  	ID *string `json:"id,omitempty"`
  5484  	// Name - READ-ONLY; The name of the ARM resource.
  5485  	Name *string `json:"name,omitempty"`
  5486  	// Type - READ-ONLY; The type of Azure resource.
  5487  	Type *string `json:"type,omitempty"`
  5488  	// Location - The location of the resource group to which the resource belongs.
  5489  	Location *string                                 `json:"location,omitempty"`
  5490  	Tags     map[string]*string                      `json:"tags"`
  5491  	Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"`
  5492  }
  5493  
  5494  // MarshalJSON is the custom marshaler for ManagedCassandraARMResourceProperties.
  5495  func (mcarp ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error) {
  5496  	objectMap := make(map[string]interface{})
  5497  	if mcarp.Location != nil {
  5498  		objectMap["location"] = mcarp.Location
  5499  	}
  5500  	if mcarp.Tags != nil {
  5501  		objectMap["tags"] = mcarp.Tags
  5502  	}
  5503  	if mcarp.Identity != nil {
  5504  		objectMap["identity"] = mcarp.Identity
  5505  	}
  5506  	return json.Marshal(objectMap)
  5507  }
  5508  
  5509  // ManagedCassandraManagedServiceIdentity identity for the resource.
  5510  type ManagedCassandraManagedServiceIdentity struct {
  5511  	// PrincipalID - READ-ONLY; The object id of the identity resource.
  5512  	PrincipalID *string `json:"principalId,omitempty"`
  5513  	// TenantID - READ-ONLY; The tenant id of the resource.
  5514  	TenantID *string `json:"tenantId,omitempty"`
  5515  	// Type - The type of the resource. Possible values include: 'ManagedCassandraResourceIdentityTypeSystemAssigned', 'ManagedCassandraResourceIdentityTypeNone'
  5516  	Type ManagedCassandraResourceIdentityType `json:"type,omitempty"`
  5517  }
  5518  
  5519  // MarshalJSON is the custom marshaler for ManagedCassandraManagedServiceIdentity.
  5520  func (mcmsi ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  5521  	objectMap := make(map[string]interface{})
  5522  	if mcmsi.Type != "" {
  5523  		objectMap["type"] = mcmsi.Type
  5524  	}
  5525  	return json.Marshal(objectMap)
  5526  }
  5527  
  5528  // ManagedCassandraReaperStatus ...
  5529  type ManagedCassandraReaperStatus struct {
  5530  	Healthy         *bool              `json:"healthy,omitempty"`
  5531  	RepairRunIds    map[string]*string `json:"repairRunIds"`
  5532  	RepairSchedules map[string]*string `json:"repairSchedules"`
  5533  }
  5534  
  5535  // MarshalJSON is the custom marshaler for ManagedCassandraReaperStatus.
  5536  func (mcrs ManagedCassandraReaperStatus) MarshalJSON() ([]byte, error) {
  5537  	objectMap := make(map[string]interface{})
  5538  	if mcrs.Healthy != nil {
  5539  		objectMap["healthy"] = mcrs.Healthy
  5540  	}
  5541  	if mcrs.RepairRunIds != nil {
  5542  		objectMap["repairRunIds"] = mcrs.RepairRunIds
  5543  	}
  5544  	if mcrs.RepairSchedules != nil {
  5545  		objectMap["repairSchedules"] = mcrs.RepairSchedules
  5546  	}
  5547  	return json.Marshal(objectMap)
  5548  }
  5549  
  5550  // ManagedServiceIdentity identity for the resource.
  5551  type ManagedServiceIdentity struct {
  5552  	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
  5553  	PrincipalID *string `json:"principalId,omitempty"`
  5554  	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
  5555  	TenantID *string `json:"tenantId,omitempty"`
  5556  	// 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'
  5557  	Type ResourceIdentityType `json:"type,omitempty"`
  5558  	// 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}'.
  5559  	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
  5560  }
  5561  
  5562  // MarshalJSON is the custom marshaler for ManagedServiceIdentity.
  5563  func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  5564  	objectMap := make(map[string]interface{})
  5565  	if msi.Type != "" {
  5566  		objectMap["type"] = msi.Type
  5567  	}
  5568  	if msi.UserAssignedIdentities != nil {
  5569  		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
  5570  	}
  5571  	return json.Marshal(objectMap)
  5572  }
  5573  
  5574  // ManagedServiceIdentityUserAssignedIdentitiesValue ...
  5575  type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
  5576  	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
  5577  	PrincipalID *string `json:"principalId,omitempty"`
  5578  	// ClientID - READ-ONLY; The client id of user assigned identity.
  5579  	ClientID *string `json:"clientId,omitempty"`
  5580  }
  5581  
  5582  // MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
  5583  func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
  5584  	objectMap := make(map[string]interface{})
  5585  	return json.Marshal(objectMap)
  5586  }
  5587  
  5588  // MaterializedViewsBuilderRegionalServiceResource resource for a regional service location.
  5589  type MaterializedViewsBuilderRegionalServiceResource struct {
  5590  	// Name - READ-ONLY; The regional service name.
  5591  	Name *string `json:"name,omitempty"`
  5592  	// Location - READ-ONLY; The location name.
  5593  	Location *string `json:"location,omitempty"`
  5594  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  5595  	Status ServiceStatus `json:"status,omitempty"`
  5596  }
  5597  
  5598  // MarshalJSON is the custom marshaler for MaterializedViewsBuilderRegionalServiceResource.
  5599  func (mvbrsr MaterializedViewsBuilderRegionalServiceResource) MarshalJSON() ([]byte, error) {
  5600  	objectMap := make(map[string]interface{})
  5601  	return json.Marshal(objectMap)
  5602  }
  5603  
  5604  // MaterializedViewsBuilderServiceResource describes the service response property for
  5605  // MaterializedViewsBuilder.
  5606  type MaterializedViewsBuilderServiceResource struct {
  5607  	Properties *MaterializedViewsBuilderServiceResourceProperties `json:"properties,omitempty"`
  5608  }
  5609  
  5610  // MaterializedViewsBuilderServiceResourceProperties properties for
  5611  // MaterializedViewsBuilderServiceResource.
  5612  type MaterializedViewsBuilderServiceResourceProperties struct {
  5613  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
  5614  	Locations *[]MaterializedViewsBuilderRegionalServiceResource `json:"locations,omitempty"`
  5615  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  5616  	AdditionalProperties map[string]interface{} `json:""`
  5617  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  5618  	CreationTime *date.Time `json:"creationTime,omitempty"`
  5619  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
  5620  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  5621  	// InstanceCount - Instance count for the service.
  5622  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  5623  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  5624  	Status ServiceStatus `json:"status,omitempty"`
  5625  	// ServiceType - Possible values include: 'ServiceTypeServiceResourceProperties', 'ServiceTypeDataTransfer', 'ServiceTypeSQLDedicatedGateway', 'ServiceTypeGraphAPICompute', 'ServiceTypeMaterializedViewsBuilder'
  5626  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  5627  }
  5628  
  5629  // MarshalJSON is the custom marshaler for MaterializedViewsBuilderServiceResourceProperties.
  5630  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte, error) {
  5631  	mvbsrp.ServiceType = ServiceTypeMaterializedViewsBuilder
  5632  	objectMap := make(map[string]interface{})
  5633  	if mvbsrp.InstanceSize != "" {
  5634  		objectMap["instanceSize"] = mvbsrp.InstanceSize
  5635  	}
  5636  	if mvbsrp.InstanceCount != nil {
  5637  		objectMap["instanceCount"] = mvbsrp.InstanceCount
  5638  	}
  5639  	if mvbsrp.ServiceType != "" {
  5640  		objectMap["serviceType"] = mvbsrp.ServiceType
  5641  	}
  5642  	for k, v := range mvbsrp.AdditionalProperties {
  5643  		objectMap[k] = v
  5644  	}
  5645  	return json.Marshal(objectMap)
  5646  }
  5647  
  5648  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5649  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  5650  	return nil, false
  5651  }
  5652  
  5653  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5654  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  5655  	return nil, false
  5656  }
  5657  
  5658  // AsGraphAPIComputeServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5659  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool) {
  5660  	return nil, false
  5661  }
  5662  
  5663  // AsMaterializedViewsBuilderServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5664  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool) {
  5665  	return &mvbsrp, true
  5666  }
  5667  
  5668  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5669  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  5670  	return nil, false
  5671  }
  5672  
  5673  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for MaterializedViewsBuilderServiceResourceProperties.
  5674  func (mvbsrp MaterializedViewsBuilderServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  5675  	return &mvbsrp, true
  5676  }
  5677  
  5678  // UnmarshalJSON is the custom unmarshaler for MaterializedViewsBuilderServiceResourceProperties struct.
  5679  func (mvbsrp *MaterializedViewsBuilderServiceResourceProperties) UnmarshalJSON(body []byte) error {
  5680  	var m map[string]*json.RawMessage
  5681  	err := json.Unmarshal(body, &m)
  5682  	if err != nil {
  5683  		return err
  5684  	}
  5685  	for k, v := range m {
  5686  		switch k {
  5687  		case "locations":
  5688  			if v != nil {
  5689  				var locations []MaterializedViewsBuilderRegionalServiceResource
  5690  				err = json.Unmarshal(*v, &locations)
  5691  				if err != nil {
  5692  					return err
  5693  				}
  5694  				mvbsrp.Locations = &locations
  5695  			}
  5696  		default:
  5697  			if v != nil {
  5698  				var additionalProperties interface{}
  5699  				err = json.Unmarshal(*v, &additionalProperties)
  5700  				if err != nil {
  5701  					return err
  5702  				}
  5703  				if mvbsrp.AdditionalProperties == nil {
  5704  					mvbsrp.AdditionalProperties = make(map[string]interface{})
  5705  				}
  5706  				mvbsrp.AdditionalProperties[k] = additionalProperties
  5707  			}
  5708  		case "creationTime":
  5709  			if v != nil {
  5710  				var creationTime date.Time
  5711  				err = json.Unmarshal(*v, &creationTime)
  5712  				if err != nil {
  5713  					return err
  5714  				}
  5715  				mvbsrp.CreationTime = &creationTime
  5716  			}
  5717  		case "instanceSize":
  5718  			if v != nil {
  5719  				var instanceSize ServiceSize
  5720  				err = json.Unmarshal(*v, &instanceSize)
  5721  				if err != nil {
  5722  					return err
  5723  				}
  5724  				mvbsrp.InstanceSize = instanceSize
  5725  			}
  5726  		case "instanceCount":
  5727  			if v != nil {
  5728  				var instanceCount int32
  5729  				err = json.Unmarshal(*v, &instanceCount)
  5730  				if err != nil {
  5731  					return err
  5732  				}
  5733  				mvbsrp.InstanceCount = &instanceCount
  5734  			}
  5735  		case "status":
  5736  			if v != nil {
  5737  				var status ServiceStatus
  5738  				err = json.Unmarshal(*v, &status)
  5739  				if err != nil {
  5740  					return err
  5741  				}
  5742  				mvbsrp.Status = status
  5743  			}
  5744  		case "serviceType":
  5745  			if v != nil {
  5746  				var serviceType ServiceTypeBasicServiceResourceProperties
  5747  				err = json.Unmarshal(*v, &serviceType)
  5748  				if err != nil {
  5749  					return err
  5750  				}
  5751  				mvbsrp.ServiceType = serviceType
  5752  			}
  5753  		}
  5754  	}
  5755  
  5756  	return nil
  5757  }
  5758  
  5759  // Metric metric data
  5760  type Metric struct {
  5761  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  5762  	StartTime *date.Time `json:"startTime,omitempty"`
  5763  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  5764  	EndTime *date.Time `json:"endTime,omitempty"`
  5765  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5766  	TimeGrain *string `json:"timeGrain,omitempty"`
  5767  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
  5768  	Unit UnitType `json:"unit,omitempty"`
  5769  	// Name - READ-ONLY; The name information for the metric.
  5770  	Name *MetricName `json:"name,omitempty"`
  5771  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  5772  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  5773  }
  5774  
  5775  // MarshalJSON is the custom marshaler for Metric.
  5776  func (mVar Metric) MarshalJSON() ([]byte, error) {
  5777  	objectMap := make(map[string]interface{})
  5778  	if mVar.Unit != "" {
  5779  		objectMap["unit"] = mVar.Unit
  5780  	}
  5781  	return json.Marshal(objectMap)
  5782  }
  5783  
  5784  // MetricAvailability the availability of the metric.
  5785  type MetricAvailability struct {
  5786  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5787  	TimeGrain *string `json:"timeGrain,omitempty"`
  5788  	// Retention - READ-ONLY; The retention for the metric values.
  5789  	Retention *string `json:"retention,omitempty"`
  5790  }
  5791  
  5792  // MarshalJSON is the custom marshaler for MetricAvailability.
  5793  func (ma MetricAvailability) MarshalJSON() ([]byte, error) {
  5794  	objectMap := make(map[string]interface{})
  5795  	return json.Marshal(objectMap)
  5796  }
  5797  
  5798  // MetricDefinition the definition of a metric.
  5799  type MetricDefinition struct {
  5800  	// MetricAvailabilities - READ-ONLY; The list of metric availabilities for the account.
  5801  	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
  5802  	// PrimaryAggregationType - READ-ONLY; The primary aggregation type of the metric. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeTotal', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeLast'
  5803  	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
  5804  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
  5805  	Unit UnitType `json:"unit,omitempty"`
  5806  	// ResourceURI - READ-ONLY; The resource uri of the database.
  5807  	ResourceURI *string `json:"resourceUri,omitempty"`
  5808  	// Name - READ-ONLY; The name information for the metric.
  5809  	Name *MetricName `json:"name,omitempty"`
  5810  }
  5811  
  5812  // MarshalJSON is the custom marshaler for MetricDefinition.
  5813  func (md MetricDefinition) MarshalJSON() ([]byte, error) {
  5814  	objectMap := make(map[string]interface{})
  5815  	if md.Unit != "" {
  5816  		objectMap["unit"] = md.Unit
  5817  	}
  5818  	return json.Marshal(objectMap)
  5819  }
  5820  
  5821  // MetricDefinitionsListResult the response to a list metric definitions request.
  5822  type MetricDefinitionsListResult struct {
  5823  	autorest.Response `json:"-"`
  5824  	// Value - READ-ONLY; The list of metric definitions for the account.
  5825  	Value *[]MetricDefinition `json:"value,omitempty"`
  5826  }
  5827  
  5828  // MarshalJSON is the custom marshaler for MetricDefinitionsListResult.
  5829  func (mdlr MetricDefinitionsListResult) MarshalJSON() ([]byte, error) {
  5830  	objectMap := make(map[string]interface{})
  5831  	return json.Marshal(objectMap)
  5832  }
  5833  
  5834  // MetricListResult the response to a list metrics request.
  5835  type MetricListResult struct {
  5836  	autorest.Response `json:"-"`
  5837  	// Value - READ-ONLY; The list of metrics for the account.
  5838  	Value *[]Metric `json:"value,omitempty"`
  5839  }
  5840  
  5841  // MarshalJSON is the custom marshaler for MetricListResult.
  5842  func (mlr MetricListResult) MarshalJSON() ([]byte, error) {
  5843  	objectMap := make(map[string]interface{})
  5844  	return json.Marshal(objectMap)
  5845  }
  5846  
  5847  // MetricName a metric name.
  5848  type MetricName struct {
  5849  	// Value - READ-ONLY; The name of the metric.
  5850  	Value *string `json:"value,omitempty"`
  5851  	// LocalizedValue - READ-ONLY; The friendly name of the metric.
  5852  	LocalizedValue *string `json:"localizedValue,omitempty"`
  5853  }
  5854  
  5855  // MarshalJSON is the custom marshaler for MetricName.
  5856  func (mn MetricName) MarshalJSON() ([]byte, error) {
  5857  	objectMap := make(map[string]interface{})
  5858  	return json.Marshal(objectMap)
  5859  }
  5860  
  5861  // MetricValue represents metrics values.
  5862  type MetricValue struct {
  5863  	// Count - READ-ONLY; The number of values for the metric.
  5864  	Count *float64 `json:"_count,omitempty"`
  5865  	// Average - READ-ONLY; The average value of the metric.
  5866  	Average *float64 `json:"average,omitempty"`
  5867  	// Maximum - READ-ONLY; The max value of the metric.
  5868  	Maximum *float64 `json:"maximum,omitempty"`
  5869  	// Minimum - READ-ONLY; The min value of the metric.
  5870  	Minimum *float64 `json:"minimum,omitempty"`
  5871  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  5872  	Timestamp *date.Time `json:"timestamp,omitempty"`
  5873  	// Total - READ-ONLY; The total value of the metric.
  5874  	Total *float64 `json:"total,omitempty"`
  5875  }
  5876  
  5877  // MarshalJSON is the custom marshaler for MetricValue.
  5878  func (mv MetricValue) MarshalJSON() ([]byte, error) {
  5879  	objectMap := make(map[string]interface{})
  5880  	return json.Marshal(objectMap)
  5881  }
  5882  
  5883  // MongoDBCollectionCreateUpdateParameters parameters to create and update Cosmos DB MongoDB collection.
  5884  type MongoDBCollectionCreateUpdateParameters struct {
  5885  	// MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
  5886  	*MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"`
  5887  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5888  	ID *string `json:"id,omitempty"`
  5889  	// Name - READ-ONLY; The name of the ARM resource.
  5890  	Name *string `json:"name,omitempty"`
  5891  	// Type - READ-ONLY; The type of Azure resource.
  5892  	Type *string `json:"type,omitempty"`
  5893  	// Location - The location of the resource group to which the resource belongs.
  5894  	Location *string            `json:"location,omitempty"`
  5895  	Tags     map[string]*string `json:"tags"`
  5896  }
  5897  
  5898  // MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateParameters.
  5899  func (mdccup MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  5900  	objectMap := make(map[string]interface{})
  5901  	if mdccup.MongoDBCollectionCreateUpdateProperties != nil {
  5902  		objectMap["properties"] = mdccup.MongoDBCollectionCreateUpdateProperties
  5903  	}
  5904  	if mdccup.Location != nil {
  5905  		objectMap["location"] = mdccup.Location
  5906  	}
  5907  	if mdccup.Tags != nil {
  5908  		objectMap["tags"] = mdccup.Tags
  5909  	}
  5910  	return json.Marshal(objectMap)
  5911  }
  5912  
  5913  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionCreateUpdateParameters struct.
  5914  func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  5915  	var m map[string]*json.RawMessage
  5916  	err := json.Unmarshal(body, &m)
  5917  	if err != nil {
  5918  		return err
  5919  	}
  5920  	for k, v := range m {
  5921  		switch k {
  5922  		case "properties":
  5923  			if v != nil {
  5924  				var mongoDBCollectionCreateUpdateProperties MongoDBCollectionCreateUpdateProperties
  5925  				err = json.Unmarshal(*v, &mongoDBCollectionCreateUpdateProperties)
  5926  				if err != nil {
  5927  					return err
  5928  				}
  5929  				mdccup.MongoDBCollectionCreateUpdateProperties = &mongoDBCollectionCreateUpdateProperties
  5930  			}
  5931  		case "id":
  5932  			if v != nil {
  5933  				var ID string
  5934  				err = json.Unmarshal(*v, &ID)
  5935  				if err != nil {
  5936  					return err
  5937  				}
  5938  				mdccup.ID = &ID
  5939  			}
  5940  		case "name":
  5941  			if v != nil {
  5942  				var name string
  5943  				err = json.Unmarshal(*v, &name)
  5944  				if err != nil {
  5945  					return err
  5946  				}
  5947  				mdccup.Name = &name
  5948  			}
  5949  		case "type":
  5950  			if v != nil {
  5951  				var typeVar string
  5952  				err = json.Unmarshal(*v, &typeVar)
  5953  				if err != nil {
  5954  					return err
  5955  				}
  5956  				mdccup.Type = &typeVar
  5957  			}
  5958  		case "location":
  5959  			if v != nil {
  5960  				var location string
  5961  				err = json.Unmarshal(*v, &location)
  5962  				if err != nil {
  5963  					return err
  5964  				}
  5965  				mdccup.Location = &location
  5966  			}
  5967  		case "tags":
  5968  			if v != nil {
  5969  				var tags map[string]*string
  5970  				err = json.Unmarshal(*v, &tags)
  5971  				if err != nil {
  5972  					return err
  5973  				}
  5974  				mdccup.Tags = tags
  5975  			}
  5976  		}
  5977  	}
  5978  
  5979  	return nil
  5980  }
  5981  
  5982  // MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB
  5983  // collection.
  5984  type MongoDBCollectionCreateUpdateProperties struct {
  5985  	// Resource - The standard JSON format of a MongoDB collection
  5986  	Resource *MongoDBCollectionResource `json:"resource,omitempty"`
  5987  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  5988  	Options *CreateUpdateOptions `json:"options,omitempty"`
  5989  }
  5990  
  5991  // MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection
  5992  type MongoDBCollectionGetProperties struct {
  5993  	Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"`
  5994  	Options  *MongoDBCollectionGetPropertiesOptions  `json:"options,omitempty"`
  5995  }
  5996  
  5997  // MongoDBCollectionGetPropertiesOptions ...
  5998  type MongoDBCollectionGetPropertiesOptions struct {
  5999  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  6000  	Throughput *int32 `json:"throughput,omitempty"`
  6001  	// AutoscaleSettings - Specifies the Autoscale settings.
  6002  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  6003  }
  6004  
  6005  // MongoDBCollectionGetPropertiesResource ...
  6006  type MongoDBCollectionGetPropertiesResource struct {
  6007  	// ID - Name of the Cosmos DB MongoDB collection
  6008  	ID *string `json:"id,omitempty"`
  6009  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  6010  	ShardKey map[string]*string `json:"shardKey"`
  6011  	// Indexes - List of index keys
  6012  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  6013  	// AnalyticalStorageTTL - Analytical TTL.
  6014  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  6015  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  6016  	Rid *string `json:"_rid,omitempty"`
  6017  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  6018  	Ts *float64 `json:"_ts,omitempty"`
  6019  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  6020  	Etag *string `json:"_etag,omitempty"`
  6021  }
  6022  
  6023  // MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource.
  6024  func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) {
  6025  	objectMap := make(map[string]interface{})
  6026  	if mdcgp.ID != nil {
  6027  		objectMap["id"] = mdcgp.ID
  6028  	}
  6029  	if mdcgp.ShardKey != nil {
  6030  		objectMap["shardKey"] = mdcgp.ShardKey
  6031  	}
  6032  	if mdcgp.Indexes != nil {
  6033  		objectMap["indexes"] = mdcgp.Indexes
  6034  	}
  6035  	if mdcgp.AnalyticalStorageTTL != nil {
  6036  		objectMap["analyticalStorageTtl"] = mdcgp.AnalyticalStorageTTL
  6037  	}
  6038  	return json.Marshal(objectMap)
  6039  }
  6040  
  6041  // MongoDBCollectionGetResults an Azure Cosmos DB MongoDB collection.
  6042  type MongoDBCollectionGetResults struct {
  6043  	autorest.Response `json:"-"`
  6044  	// MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection
  6045  	*MongoDBCollectionGetProperties `json:"properties,omitempty"`
  6046  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  6047  	ID *string `json:"id,omitempty"`
  6048  	// Name - READ-ONLY; The name of the ARM resource.
  6049  	Name *string `json:"name,omitempty"`
  6050  	// Type - READ-ONLY; The type of Azure resource.
  6051  	Type *string `json:"type,omitempty"`
  6052  	// Location - The location of the resource group to which the resource belongs.
  6053  	Location *string            `json:"location,omitempty"`
  6054  	Tags     map[string]*string `json:"tags"`
  6055  }
  6056  
  6057  // MarshalJSON is the custom marshaler for MongoDBCollectionGetResults.
  6058  func (mdcgr MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) {
  6059  	objectMap := make(map[string]interface{})
  6060  	if mdcgr.MongoDBCollectionGetProperties != nil {
  6061  		objectMap["properties"] = mdcgr.MongoDBCollectionGetProperties
  6062  	}
  6063  	if mdcgr.Location != nil {
  6064  		objectMap["location"] = mdcgr.Location
  6065  	}
  6066  	if mdcgr.Tags != nil {
  6067  		objectMap["tags"] = mdcgr.Tags
  6068  	}
  6069  	return json.Marshal(objectMap)
  6070  }
  6071  
  6072  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionGetResults struct.
  6073  func (mdcgr *MongoDBCollectionGetResults) UnmarshalJSON(body []byte) error {
  6074  	var m map[string]*json.RawMessage
  6075  	err := json.Unmarshal(body, &m)
  6076  	if err != nil {
  6077  		return err
  6078  	}
  6079  	for k, v := range m {
  6080  		switch k {
  6081  		case "properties":
  6082  			if v != nil {
  6083  				var mongoDBCollectionGetProperties MongoDBCollectionGetProperties
  6084  				err = json.Unmarshal(*v, &mongoDBCollectionGetProperties)
  6085  				if err != nil {
  6086  					return err
  6087  				}
  6088  				mdcgr.MongoDBCollectionGetProperties = &mongoDBCollectionGetProperties
  6089  			}
  6090  		case "id":
  6091  			if v != nil {
  6092  				var ID string
  6093  				err = json.Unmarshal(*v, &ID)
  6094  				if err != nil {
  6095  					return err
  6096  				}
  6097  				mdcgr.ID = &ID
  6098  			}
  6099  		case "name":
  6100  			if v != nil {
  6101  				var name string
  6102  				err = json.Unmarshal(*v, &name)
  6103  				if err != nil {
  6104  					return err
  6105  				}
  6106  				mdcgr.Name = &name
  6107  			}
  6108  		case "type":
  6109  			if v != nil {
  6110  				var typeVar string
  6111  				err = json.Unmarshal(*v, &typeVar)
  6112  				if err != nil {
  6113  					return err
  6114  				}
  6115  				mdcgr.Type = &typeVar
  6116  			}
  6117  		case "location":
  6118  			if v != nil {
  6119  				var location string
  6120  				err = json.Unmarshal(*v, &location)
  6121  				if err != nil {
  6122  					return err
  6123  				}
  6124  				mdcgr.Location = &location
  6125  			}
  6126  		case "tags":
  6127  			if v != nil {
  6128  				var tags map[string]*string
  6129  				err = json.Unmarshal(*v, &tags)
  6130  				if err != nil {
  6131  					return err
  6132  				}
  6133  				mdcgr.Tags = tags
  6134  			}
  6135  		}
  6136  	}
  6137  
  6138  	return nil
  6139  }
  6140  
  6141  // MongoDBCollectionListResult the List operation response, that contains the MongoDB collections and their
  6142  // properties.
  6143  type MongoDBCollectionListResult struct {
  6144  	autorest.Response `json:"-"`
  6145  	// Value - READ-ONLY; List of MongoDB collections and their properties.
  6146  	Value *[]MongoDBCollectionGetResults `json:"value,omitempty"`
  6147  }
  6148  
  6149  // MarshalJSON is the custom marshaler for MongoDBCollectionListResult.
  6150  func (mdclr MongoDBCollectionListResult) MarshalJSON() ([]byte, error) {
  6151  	objectMap := make(map[string]interface{})
  6152  	return json.Marshal(objectMap)
  6153  }
  6154  
  6155  // MongoDBCollectionResource cosmos DB MongoDB collection resource object
  6156  type MongoDBCollectionResource struct {
  6157  	// ID - Name of the Cosmos DB MongoDB collection
  6158  	ID *string `json:"id,omitempty"`
  6159  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  6160  	ShardKey map[string]*string `json:"shardKey"`
  6161  	// Indexes - List of index keys
  6162  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  6163  	// AnalyticalStorageTTL - Analytical TTL.
  6164  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  6165  }
  6166  
  6167  // MarshalJSON is the custom marshaler for MongoDBCollectionResource.
  6168  func (mdcr MongoDBCollectionResource) MarshalJSON() ([]byte, error) {
  6169  	objectMap := make(map[string]interface{})
  6170  	if mdcr.ID != nil {
  6171  		objectMap["id"] = mdcr.ID
  6172  	}
  6173  	if mdcr.ShardKey != nil {
  6174  		objectMap["shardKey"] = mdcr.ShardKey
  6175  	}
  6176  	if mdcr.Indexes != nil {
  6177  		objectMap["indexes"] = mdcr.Indexes
  6178  	}
  6179  	if mdcr.AnalyticalStorageTTL != nil {
  6180  		objectMap["analyticalStorageTtl"] = mdcr.AnalyticalStorageTTL
  6181  	}
  6182  	return json.Marshal(objectMap)
  6183  }
  6184  
  6185  // MongoDBDatabaseCreateUpdateParameters parameters to create and update Cosmos DB MongoDB database.
  6186  type MongoDBDatabaseCreateUpdateParameters struct {
  6187  	// MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
  6188  	*MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  6189  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  6190  	ID *string `json:"id,omitempty"`
  6191  	// Name - READ-ONLY; The name of the ARM resource.
  6192  	Name *string `json:"name,omitempty"`
  6193  	// Type - READ-ONLY; The type of Azure resource.
  6194  	Type *string `json:"type,omitempty"`
  6195  	// Location - The location of the resource group to which the resource belongs.
  6196  	Location *string            `json:"location,omitempty"`
  6197  	Tags     map[string]*string `json:"tags"`
  6198  }
  6199  
  6200  // MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateParameters.
  6201  func (mddcup MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  6202  	objectMap := make(map[string]interface{})
  6203  	if mddcup.MongoDBDatabaseCreateUpdateProperties != nil {
  6204  		objectMap["properties"] = mddcup.MongoDBDatabaseCreateUpdateProperties
  6205  	}
  6206  	if mddcup.Location != nil {
  6207  		objectMap["location"] = mddcup.Location
  6208  	}
  6209  	if mddcup.Tags != nil {
  6210  		objectMap["tags"] = mddcup.Tags
  6211  	}
  6212  	return json.Marshal(objectMap)
  6213  }
  6214  
  6215  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseCreateUpdateParameters struct.
  6216  func (mddcup *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  6217  	var m map[string]*json.RawMessage
  6218  	err := json.Unmarshal(body, &m)
  6219  	if err != nil {
  6220  		return err
  6221  	}
  6222  	for k, v := range m {
  6223  		switch k {
  6224  		case "properties":
  6225  			if v != nil {
  6226  				var mongoDBDatabaseCreateUpdateProperties MongoDBDatabaseCreateUpdateProperties
  6227  				err = json.Unmarshal(*v, &mongoDBDatabaseCreateUpdateProperties)
  6228  				if err != nil {
  6229  					return err
  6230  				}
  6231  				mddcup.MongoDBDatabaseCreateUpdateProperties = &mongoDBDatabaseCreateUpdateProperties
  6232  			}
  6233  		case "id":
  6234  			if v != nil {
  6235  				var ID string
  6236  				err = json.Unmarshal(*v, &ID)
  6237  				if err != nil {
  6238  					return err
  6239  				}
  6240  				mddcup.ID = &ID
  6241  			}
  6242  		case "name":
  6243  			if v != nil {
  6244  				var name string
  6245  				err = json.Unmarshal(*v, &name)
  6246  				if err != nil {
  6247  					return err
  6248  				}
  6249  				mddcup.Name = &name
  6250  			}
  6251  		case "type":
  6252  			if v != nil {
  6253  				var typeVar string
  6254  				err = json.Unmarshal(*v, &typeVar)
  6255  				if err != nil {
  6256  					return err
  6257  				}
  6258  				mddcup.Type = &typeVar
  6259  			}
  6260  		case "location":
  6261  			if v != nil {
  6262  				var location string
  6263  				err = json.Unmarshal(*v, &location)
  6264  				if err != nil {
  6265  					return err
  6266  				}
  6267  				mddcup.Location = &location
  6268  			}
  6269  		case "tags":
  6270  			if v != nil {
  6271  				var tags map[string]*string
  6272  				err = json.Unmarshal(*v, &tags)
  6273  				if err != nil {
  6274  					return err
  6275  				}
  6276  				mddcup.Tags = tags
  6277  			}
  6278  		}
  6279  	}
  6280  
  6281  	return nil
  6282  }
  6283  
  6284  // MongoDBDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB database.
  6285  type MongoDBDatabaseCreateUpdateProperties struct {
  6286  	// Resource - The standard JSON format of a MongoDB database
  6287  	Resource *MongoDBDatabaseResource `json:"resource,omitempty"`
  6288  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  6289  	Options *CreateUpdateOptions `json:"options,omitempty"`
  6290  }
  6291  
  6292  // MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database
  6293  type MongoDBDatabaseGetProperties struct {
  6294  	Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"`
  6295  	Options  *MongoDBDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  6296  }
  6297  
  6298  // MongoDBDatabaseGetPropertiesOptions ...
  6299  type MongoDBDatabaseGetPropertiesOptions struct {
  6300  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  6301  	Throughput *int32 `json:"throughput,omitempty"`
  6302  	// AutoscaleSettings - Specifies the Autoscale settings.
  6303  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  6304  }
  6305  
  6306  // MongoDBDatabaseGetPropertiesResource ...
  6307  type MongoDBDatabaseGetPropertiesResource struct {
  6308  	// ID - Name of the Cosmos DB MongoDB database
  6309  	ID *string `json:"id,omitempty"`
  6310  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  6311  	Rid *string `json:"_rid,omitempty"`
  6312  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  6313  	Ts *float64 `json:"_ts,omitempty"`
  6314  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  6315  	Etag *string `json:"_etag,omitempty"`
  6316  }
  6317  
  6318  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetPropertiesResource.
  6319  func (mddgp MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  6320  	objectMap := make(map[string]interface{})
  6321  	if mddgp.ID != nil {
  6322  		objectMap["id"] = mddgp.ID
  6323  	}
  6324  	return json.Marshal(objectMap)
  6325  }
  6326  
  6327  // MongoDBDatabaseGetResults an Azure Cosmos DB MongoDB database.
  6328  type MongoDBDatabaseGetResults struct {
  6329  	autorest.Response `json:"-"`
  6330  	// MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database
  6331  	*MongoDBDatabaseGetProperties `json:"properties,omitempty"`
  6332  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  6333  	ID *string `json:"id,omitempty"`
  6334  	// Name - READ-ONLY; The name of the ARM resource.
  6335  	Name *string `json:"name,omitempty"`
  6336  	// Type - READ-ONLY; The type of Azure resource.
  6337  	Type *string `json:"type,omitempty"`
  6338  	// Location - The location of the resource group to which the resource belongs.
  6339  	Location *string            `json:"location,omitempty"`
  6340  	Tags     map[string]*string `json:"tags"`
  6341  }
  6342  
  6343  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetResults.
  6344  func (mddgr MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) {
  6345  	objectMap := make(map[string]interface{})
  6346  	if mddgr.MongoDBDatabaseGetProperties != nil {
  6347  		objectMap["properties"] = mddgr.MongoDBDatabaseGetProperties
  6348  	}
  6349  	if mddgr.Location != nil {
  6350  		objectMap["location"] = mddgr.Location
  6351  	}
  6352  	if mddgr.Tags != nil {
  6353  		objectMap["tags"] = mddgr.Tags
  6354  	}
  6355  	return json.Marshal(objectMap)
  6356  }
  6357  
  6358  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseGetResults struct.
  6359  func (mddgr *MongoDBDatabaseGetResults) UnmarshalJSON(body []byte) error {
  6360  	var m map[string]*json.RawMessage
  6361  	err := json.Unmarshal(body, &m)
  6362  	if err != nil {
  6363  		return err
  6364  	}
  6365  	for k, v := range m {
  6366  		switch k {
  6367  		case "properties":
  6368  			if v != nil {
  6369  				var mongoDBDatabaseGetProperties MongoDBDatabaseGetProperties
  6370  				err = json.Unmarshal(*v, &mongoDBDatabaseGetProperties)
  6371  				if err != nil {
  6372  					return err
  6373  				}
  6374  				mddgr.MongoDBDatabaseGetProperties = &mongoDBDatabaseGetProperties
  6375  			}
  6376  		case "id":
  6377  			if v != nil {
  6378  				var ID string
  6379  				err = json.Unmarshal(*v, &ID)
  6380  				if err != nil {
  6381  					return err
  6382  				}
  6383  				mddgr.ID = &ID
  6384  			}
  6385  		case "name":
  6386  			if v != nil {
  6387  				var name string
  6388  				err = json.Unmarshal(*v, &name)
  6389  				if err != nil {
  6390  					return err
  6391  				}
  6392  				mddgr.Name = &name
  6393  			}
  6394  		case "type":
  6395  			if v != nil {
  6396  				var typeVar string
  6397  				err = json.Unmarshal(*v, &typeVar)
  6398  				if err != nil {
  6399  					return err
  6400  				}
  6401  				mddgr.Type = &typeVar
  6402  			}
  6403  		case "location":
  6404  			if v != nil {
  6405  				var location string
  6406  				err = json.Unmarshal(*v, &location)
  6407  				if err != nil {
  6408  					return err
  6409  				}
  6410  				mddgr.Location = &location
  6411  			}
  6412  		case "tags":
  6413  			if v != nil {
  6414  				var tags map[string]*string
  6415  				err = json.Unmarshal(*v, &tags)
  6416  				if err != nil {
  6417  					return err
  6418  				}
  6419  				mddgr.Tags = tags
  6420  			}
  6421  		}
  6422  	}
  6423  
  6424  	return nil
  6425  }
  6426  
  6427  // MongoDBDatabaseListResult the List operation response, that contains the MongoDB databases and their
  6428  // properties.
  6429  type MongoDBDatabaseListResult struct {
  6430  	autorest.Response `json:"-"`
  6431  	// Value - READ-ONLY; List of MongoDB databases and their properties.
  6432  	Value *[]MongoDBDatabaseGetResults `json:"value,omitempty"`
  6433  }
  6434  
  6435  // MarshalJSON is the custom marshaler for MongoDBDatabaseListResult.
  6436  func (mddlr MongoDBDatabaseListResult) MarshalJSON() ([]byte, error) {
  6437  	objectMap := make(map[string]interface{})
  6438  	return json.Marshal(objectMap)
  6439  }
  6440  
  6441  // MongoDBDatabaseResource cosmos DB MongoDB database resource object
  6442  type MongoDBDatabaseResource struct {
  6443  	// ID - Name of the Cosmos DB MongoDB database
  6444  	ID *string `json:"id,omitempty"`
  6445  }
  6446  
  6447  // MongoDBResourcesCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the
  6448  // results of a long-running operation.
  6449  type MongoDBResourcesCreateUpdateMongoDBCollectionFuture struct {
  6450  	azure.FutureAPI
  6451  	// Result returns the result of the asynchronous operation.
  6452  	// If the operation has not completed it will return an error.
  6453  	Result func(MongoDBResourcesClient) (MongoDBCollectionGetResults, error)
  6454  }
  6455  
  6456  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6457  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  6458  	var azFuture azure.Future
  6459  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6460  		return err
  6461  	}
  6462  	future.FutureAPI = &azFuture
  6463  	future.Result = future.result
  6464  	return nil
  6465  }
  6466  
  6467  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBCollectionFuture.Result.
  6468  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) result(client MongoDBResourcesClient) (mdcgr MongoDBCollectionGetResults, err error) {
  6469  	var done bool
  6470  	done, err = future.DoneWithContext(context.Background(), client)
  6471  	if err != nil {
  6472  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  6473  		return
  6474  	}
  6475  	if !done {
  6476  		mdcgr.Response.Response = future.Response()
  6477  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture")
  6478  		return
  6479  	}
  6480  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6481  	if mdcgr.Response.Response, err = future.GetResult(sender); err == nil && mdcgr.Response.Response.StatusCode != http.StatusNoContent {
  6482  		mdcgr, err = client.CreateUpdateMongoDBCollectionResponder(mdcgr.Response.Response)
  6483  		if err != nil {
  6484  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", mdcgr.Response.Response, "Failure responding to request")
  6485  		}
  6486  	}
  6487  	return
  6488  }
  6489  
  6490  // MongoDBResourcesCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the
  6491  // results of a long-running operation.
  6492  type MongoDBResourcesCreateUpdateMongoDBDatabaseFuture struct {
  6493  	azure.FutureAPI
  6494  	// Result returns the result of the asynchronous operation.
  6495  	// If the operation has not completed it will return an error.
  6496  	Result func(MongoDBResourcesClient) (MongoDBDatabaseGetResults, error)
  6497  }
  6498  
  6499  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6500  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  6501  	var azFuture azure.Future
  6502  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6503  		return err
  6504  	}
  6505  	future.FutureAPI = &azFuture
  6506  	future.Result = future.result
  6507  	return nil
  6508  }
  6509  
  6510  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBDatabaseFuture.Result.
  6511  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (mddgr MongoDBDatabaseGetResults, err error) {
  6512  	var done bool
  6513  	done, err = future.DoneWithContext(context.Background(), client)
  6514  	if err != nil {
  6515  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  6516  		return
  6517  	}
  6518  	if !done {
  6519  		mddgr.Response.Response = future.Response()
  6520  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture")
  6521  		return
  6522  	}
  6523  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6524  	if mddgr.Response.Response, err = future.GetResult(sender); err == nil && mddgr.Response.Response.StatusCode != http.StatusNoContent {
  6525  		mddgr, err = client.CreateUpdateMongoDBDatabaseResponder(mddgr.Response.Response)
  6526  		if err != nil {
  6527  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", mddgr.Response.Response, "Failure responding to request")
  6528  		}
  6529  	}
  6530  	return
  6531  }
  6532  
  6533  // MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture an abstraction for monitoring and retrieving the
  6534  // results of a long-running operation.
  6535  type MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture struct {
  6536  	azure.FutureAPI
  6537  	// Result returns the result of the asynchronous operation.
  6538  	// If the operation has not completed it will return an error.
  6539  	Result func(MongoDBResourcesClient) (MongoRoleDefinitionGetResults, error)
  6540  }
  6541  
  6542  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6543  func (future *MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
  6544  	var azFuture azure.Future
  6545  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6546  		return err
  6547  	}
  6548  	future.FutureAPI = &azFuture
  6549  	future.Result = future.result
  6550  	return nil
  6551  }
  6552  
  6553  // result is the default implementation for MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture.Result.
  6554  func (future *MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture) result(client MongoDBResourcesClient) (mrdgr MongoRoleDefinitionGetResults, err error) {
  6555  	var done bool
  6556  	done, err = future.DoneWithContext(context.Background(), client)
  6557  	if err != nil {
  6558  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
  6559  		return
  6560  	}
  6561  	if !done {
  6562  		mrdgr.Response.Response = future.Response()
  6563  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture")
  6564  		return
  6565  	}
  6566  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6567  	if mrdgr.Response.Response, err = future.GetResult(sender); err == nil && mrdgr.Response.Response.StatusCode != http.StatusNoContent {
  6568  		mrdgr, err = client.CreateUpdateMongoRoleDefinitionResponder(mrdgr.Response.Response)
  6569  		if err != nil {
  6570  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoRoleDefinitionFuture", "Result", mrdgr.Response.Response, "Failure responding to request")
  6571  		}
  6572  	}
  6573  	return
  6574  }
  6575  
  6576  // MongoDBResourcesCreateUpdateMongoUserDefinitionFuture an abstraction for monitoring and retrieving the
  6577  // results of a long-running operation.
  6578  type MongoDBResourcesCreateUpdateMongoUserDefinitionFuture struct {
  6579  	azure.FutureAPI
  6580  	// Result returns the result of the asynchronous operation.
  6581  	// If the operation has not completed it will return an error.
  6582  	Result func(MongoDBResourcesClient) (MongoUserDefinitionGetResults, error)
  6583  }
  6584  
  6585  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6586  func (future *MongoDBResourcesCreateUpdateMongoUserDefinitionFuture) UnmarshalJSON(body []byte) error {
  6587  	var azFuture azure.Future
  6588  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6589  		return err
  6590  	}
  6591  	future.FutureAPI = &azFuture
  6592  	future.Result = future.result
  6593  	return nil
  6594  }
  6595  
  6596  // result is the default implementation for MongoDBResourcesCreateUpdateMongoUserDefinitionFuture.Result.
  6597  func (future *MongoDBResourcesCreateUpdateMongoUserDefinitionFuture) result(client MongoDBResourcesClient) (mudgr MongoUserDefinitionGetResults, err error) {
  6598  	var done bool
  6599  	done, err = future.DoneWithContext(context.Background(), client)
  6600  	if err != nil {
  6601  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoUserDefinitionFuture", "Result", future.Response(), "Polling failure")
  6602  		return
  6603  	}
  6604  	if !done {
  6605  		mudgr.Response.Response = future.Response()
  6606  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoUserDefinitionFuture")
  6607  		return
  6608  	}
  6609  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6610  	if mudgr.Response.Response, err = future.GetResult(sender); err == nil && mudgr.Response.Response.StatusCode != http.StatusNoContent {
  6611  		mudgr, err = client.CreateUpdateMongoUserDefinitionResponder(mudgr.Response.Response)
  6612  		if err != nil {
  6613  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoUserDefinitionFuture", "Result", mudgr.Response.Response, "Failure responding to request")
  6614  		}
  6615  	}
  6616  	return
  6617  }
  6618  
  6619  // MongoDBResourcesDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results
  6620  // of a long-running operation.
  6621  type MongoDBResourcesDeleteMongoDBCollectionFuture struct {
  6622  	azure.FutureAPI
  6623  	// Result returns the result of the asynchronous operation.
  6624  	// If the operation has not completed it will return an error.
  6625  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6626  }
  6627  
  6628  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6629  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  6630  	var azFuture azure.Future
  6631  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6632  		return err
  6633  	}
  6634  	future.FutureAPI = &azFuture
  6635  	future.Result = future.result
  6636  	return nil
  6637  }
  6638  
  6639  // result is the default implementation for MongoDBResourcesDeleteMongoDBCollectionFuture.Result.
  6640  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6641  	var done bool
  6642  	done, err = future.DoneWithContext(context.Background(), client)
  6643  	if err != nil {
  6644  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  6645  		return
  6646  	}
  6647  	if !done {
  6648  		ar.Response = future.Response()
  6649  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture")
  6650  		return
  6651  	}
  6652  	ar.Response = future.Response()
  6653  	return
  6654  }
  6655  
  6656  // MongoDBResourcesDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of
  6657  // a long-running operation.
  6658  type MongoDBResourcesDeleteMongoDBDatabaseFuture struct {
  6659  	azure.FutureAPI
  6660  	// Result returns the result of the asynchronous operation.
  6661  	// If the operation has not completed it will return an error.
  6662  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6663  }
  6664  
  6665  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6666  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  6667  	var azFuture azure.Future
  6668  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6669  		return err
  6670  	}
  6671  	future.FutureAPI = &azFuture
  6672  	future.Result = future.result
  6673  	return nil
  6674  }
  6675  
  6676  // result is the default implementation for MongoDBResourcesDeleteMongoDBDatabaseFuture.Result.
  6677  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6678  	var done bool
  6679  	done, err = future.DoneWithContext(context.Background(), client)
  6680  	if err != nil {
  6681  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  6682  		return
  6683  	}
  6684  	if !done {
  6685  		ar.Response = future.Response()
  6686  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture")
  6687  		return
  6688  	}
  6689  	ar.Response = future.Response()
  6690  	return
  6691  }
  6692  
  6693  // MongoDBResourcesDeleteMongoRoleDefinitionFuture an abstraction for monitoring and retrieving the results
  6694  // of a long-running operation.
  6695  type MongoDBResourcesDeleteMongoRoleDefinitionFuture struct {
  6696  	azure.FutureAPI
  6697  	// Result returns the result of the asynchronous operation.
  6698  	// If the operation has not completed it will return an error.
  6699  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6700  }
  6701  
  6702  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6703  func (future *MongoDBResourcesDeleteMongoRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
  6704  	var azFuture azure.Future
  6705  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6706  		return err
  6707  	}
  6708  	future.FutureAPI = &azFuture
  6709  	future.Result = future.result
  6710  	return nil
  6711  }
  6712  
  6713  // result is the default implementation for MongoDBResourcesDeleteMongoRoleDefinitionFuture.Result.
  6714  func (future *MongoDBResourcesDeleteMongoRoleDefinitionFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6715  	var done bool
  6716  	done, err = future.DoneWithContext(context.Background(), client)
  6717  	if err != nil {
  6718  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
  6719  		return
  6720  	}
  6721  	if !done {
  6722  		ar.Response = future.Response()
  6723  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoRoleDefinitionFuture")
  6724  		return
  6725  	}
  6726  	ar.Response = future.Response()
  6727  	return
  6728  }
  6729  
  6730  // MongoDBResourcesDeleteMongoUserDefinitionFuture an abstraction for monitoring and retrieving the results
  6731  // of a long-running operation.
  6732  type MongoDBResourcesDeleteMongoUserDefinitionFuture struct {
  6733  	azure.FutureAPI
  6734  	// Result returns the result of the asynchronous operation.
  6735  	// If the operation has not completed it will return an error.
  6736  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  6737  }
  6738  
  6739  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6740  func (future *MongoDBResourcesDeleteMongoUserDefinitionFuture) UnmarshalJSON(body []byte) error {
  6741  	var azFuture azure.Future
  6742  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6743  		return err
  6744  	}
  6745  	future.FutureAPI = &azFuture
  6746  	future.Result = future.result
  6747  	return nil
  6748  }
  6749  
  6750  // result is the default implementation for MongoDBResourcesDeleteMongoUserDefinitionFuture.Result.
  6751  func (future *MongoDBResourcesDeleteMongoUserDefinitionFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  6752  	var done bool
  6753  	done, err = future.DoneWithContext(context.Background(), client)
  6754  	if err != nil {
  6755  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoUserDefinitionFuture", "Result", future.Response(), "Polling failure")
  6756  		return
  6757  	}
  6758  	if !done {
  6759  		ar.Response = future.Response()
  6760  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoUserDefinitionFuture")
  6761  		return
  6762  	}
  6763  	ar.Response = future.Response()
  6764  	return
  6765  }
  6766  
  6767  // MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture an abstraction for monitoring and retrieving
  6768  // the results of a long-running operation.
  6769  type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture struct {
  6770  	azure.FutureAPI
  6771  	// Result returns the result of the asynchronous operation.
  6772  	// If the operation has not completed it will return an error.
  6773  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6774  }
  6775  
  6776  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6777  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  6778  	var azFuture azure.Future
  6779  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6780  		return err
  6781  	}
  6782  	future.FutureAPI = &azFuture
  6783  	future.Result = future.result
  6784  	return nil
  6785  }
  6786  
  6787  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture.Result.
  6788  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6789  	var done bool
  6790  	done, err = future.DoneWithContext(context.Background(), client)
  6791  	if err != nil {
  6792  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  6793  		return
  6794  	}
  6795  	if !done {
  6796  		tsgr.Response.Response = future.Response()
  6797  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture")
  6798  		return
  6799  	}
  6800  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6801  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6802  		tsgr, err = client.MigrateMongoDBCollectionToAutoscaleResponder(tsgr.Response.Response)
  6803  		if err != nil {
  6804  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6805  		}
  6806  	}
  6807  	return
  6808  }
  6809  
  6810  // MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture an abstraction for monitoring and
  6811  // retrieving the results of a long-running operation.
  6812  type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture struct {
  6813  	azure.FutureAPI
  6814  	// Result returns the result of the asynchronous operation.
  6815  	// If the operation has not completed it will return an error.
  6816  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6817  }
  6818  
  6819  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6820  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6821  	var azFuture azure.Future
  6822  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6823  		return err
  6824  	}
  6825  	future.FutureAPI = &azFuture
  6826  	future.Result = future.result
  6827  	return nil
  6828  }
  6829  
  6830  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture.Result.
  6831  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6832  	var done bool
  6833  	done, err = future.DoneWithContext(context.Background(), client)
  6834  	if err != nil {
  6835  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6836  		return
  6837  	}
  6838  	if !done {
  6839  		tsgr.Response.Response = future.Response()
  6840  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture")
  6841  		return
  6842  	}
  6843  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6844  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6845  		tsgr, err = client.MigrateMongoDBCollectionToManualThroughputResponder(tsgr.Response.Response)
  6846  		if err != nil {
  6847  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6848  		}
  6849  	}
  6850  	return
  6851  }
  6852  
  6853  // MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  6854  // results of a long-running operation.
  6855  type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture struct {
  6856  	azure.FutureAPI
  6857  	// Result returns the result of the asynchronous operation.
  6858  	// If the operation has not completed it will return an error.
  6859  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6860  }
  6861  
  6862  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6863  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  6864  	var azFuture azure.Future
  6865  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6866  		return err
  6867  	}
  6868  	future.FutureAPI = &azFuture
  6869  	future.Result = future.result
  6870  	return nil
  6871  }
  6872  
  6873  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture.Result.
  6874  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6875  	var done bool
  6876  	done, err = future.DoneWithContext(context.Background(), client)
  6877  	if err != nil {
  6878  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  6879  		return
  6880  	}
  6881  	if !done {
  6882  		tsgr.Response.Response = future.Response()
  6883  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture")
  6884  		return
  6885  	}
  6886  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6887  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6888  		tsgr, err = client.MigrateMongoDBDatabaseToAutoscaleResponder(tsgr.Response.Response)
  6889  		if err != nil {
  6890  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6891  		}
  6892  	}
  6893  	return
  6894  }
  6895  
  6896  // MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture an abstraction for monitoring and
  6897  // retrieving the results of a long-running operation.
  6898  type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture struct {
  6899  	azure.FutureAPI
  6900  	// Result returns the result of the asynchronous operation.
  6901  	// If the operation has not completed it will return an error.
  6902  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6903  }
  6904  
  6905  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6906  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6907  	var azFuture azure.Future
  6908  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6909  		return err
  6910  	}
  6911  	future.FutureAPI = &azFuture
  6912  	future.Result = future.result
  6913  	return nil
  6914  }
  6915  
  6916  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture.Result.
  6917  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6918  	var done bool
  6919  	done, err = future.DoneWithContext(context.Background(), client)
  6920  	if err != nil {
  6921  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6922  		return
  6923  	}
  6924  	if !done {
  6925  		tsgr.Response.Response = future.Response()
  6926  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture")
  6927  		return
  6928  	}
  6929  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6930  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6931  		tsgr, err = client.MigrateMongoDBDatabaseToManualThroughputResponder(tsgr.Response.Response)
  6932  		if err != nil {
  6933  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6934  		}
  6935  	}
  6936  	return
  6937  }
  6938  
  6939  // MongoDBResourcesRetrieveContinuousBackupInformationFuture an abstraction for monitoring and retrieving
  6940  // the results of a long-running operation.
  6941  type MongoDBResourcesRetrieveContinuousBackupInformationFuture struct {
  6942  	azure.FutureAPI
  6943  	// Result returns the result of the asynchronous operation.
  6944  	// If the operation has not completed it will return an error.
  6945  	Result func(MongoDBResourcesClient) (BackupInformation, error)
  6946  }
  6947  
  6948  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6949  func (future *MongoDBResourcesRetrieveContinuousBackupInformationFuture) UnmarshalJSON(body []byte) error {
  6950  	var azFuture azure.Future
  6951  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6952  		return err
  6953  	}
  6954  	future.FutureAPI = &azFuture
  6955  	future.Result = future.result
  6956  	return nil
  6957  }
  6958  
  6959  // result is the default implementation for MongoDBResourcesRetrieveContinuousBackupInformationFuture.Result.
  6960  func (future *MongoDBResourcesRetrieveContinuousBackupInformationFuture) result(client MongoDBResourcesClient) (bi BackupInformation, err error) {
  6961  	var done bool
  6962  	done, err = future.DoneWithContext(context.Background(), client)
  6963  	if err != nil {
  6964  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture", "Result", future.Response(), "Polling failure")
  6965  		return
  6966  	}
  6967  	if !done {
  6968  		bi.Response.Response = future.Response()
  6969  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture")
  6970  		return
  6971  	}
  6972  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6973  	if bi.Response.Response, err = future.GetResult(sender); err == nil && bi.Response.Response.StatusCode != http.StatusNoContent {
  6974  		bi, err = client.RetrieveContinuousBackupInformationResponder(bi.Response.Response)
  6975  		if err != nil {
  6976  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture", "Result", bi.Response.Response, "Failure responding to request")
  6977  		}
  6978  	}
  6979  	return
  6980  }
  6981  
  6982  // MongoDBResourcesUpdateMongoDBCollectionThroughputFuture an abstraction for monitoring and retrieving the
  6983  // results of a long-running operation.
  6984  type MongoDBResourcesUpdateMongoDBCollectionThroughputFuture struct {
  6985  	azure.FutureAPI
  6986  	// Result returns the result of the asynchronous operation.
  6987  	// If the operation has not completed it will return an error.
  6988  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6989  }
  6990  
  6991  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6992  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) UnmarshalJSON(body []byte) error {
  6993  	var azFuture azure.Future
  6994  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6995  		return err
  6996  	}
  6997  	future.FutureAPI = &azFuture
  6998  	future.Result = future.result
  6999  	return nil
  7000  }
  7001  
  7002  // result is the default implementation for MongoDBResourcesUpdateMongoDBCollectionThroughputFuture.Result.
  7003  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  7004  	var done bool
  7005  	done, err = future.DoneWithContext(context.Background(), client)
  7006  	if err != nil {
  7007  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", future.Response(), "Polling failure")
  7008  		return
  7009  	}
  7010  	if !done {
  7011  		tsgr.Response.Response = future.Response()
  7012  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture")
  7013  		return
  7014  	}
  7015  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7016  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  7017  		tsgr, err = client.UpdateMongoDBCollectionThroughputResponder(tsgr.Response.Response)
  7018  		if err != nil {
  7019  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  7020  		}
  7021  	}
  7022  	return
  7023  }
  7024  
  7025  // MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  7026  // results of a long-running operation.
  7027  type MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture struct {
  7028  	azure.FutureAPI
  7029  	// Result returns the result of the asynchronous operation.
  7030  	// If the operation has not completed it will return an error.
  7031  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  7032  }
  7033  
  7034  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7035  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  7036  	var azFuture azure.Future
  7037  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7038  		return err
  7039  	}
  7040  	future.FutureAPI = &azFuture
  7041  	future.Result = future.result
  7042  	return nil
  7043  }
  7044  
  7045  // result is the default implementation for MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture.Result.
  7046  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  7047  	var done bool
  7048  	done, err = future.DoneWithContext(context.Background(), client)
  7049  	if err != nil {
  7050  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  7051  		return
  7052  	}
  7053  	if !done {
  7054  		tsgr.Response.Response = future.Response()
  7055  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture")
  7056  		return
  7057  	}
  7058  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7059  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  7060  		tsgr, err = client.UpdateMongoDBDatabaseThroughputResponder(tsgr.Response.Response)
  7061  		if err != nil {
  7062  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  7063  		}
  7064  	}
  7065  	return
  7066  }
  7067  
  7068  // MongoIndex cosmos DB MongoDB collection index key
  7069  type MongoIndex struct {
  7070  	// Key - Cosmos DB MongoDB collection index keys
  7071  	Key *MongoIndexKeys `json:"key,omitempty"`
  7072  	// Options - Cosmos DB MongoDB collection index key options
  7073  	Options *MongoIndexOptions `json:"options,omitempty"`
  7074  }
  7075  
  7076  // MongoIndexKeys cosmos DB MongoDB collection resource object
  7077  type MongoIndexKeys struct {
  7078  	// Keys - List of keys for each MongoDB collection in the Azure Cosmos DB service
  7079  	Keys *[]string `json:"keys,omitempty"`
  7080  }
  7081  
  7082  // MongoIndexOptions cosmos DB MongoDB collection index options
  7083  type MongoIndexOptions struct {
  7084  	// ExpireAfterSeconds - Expire after seconds
  7085  	ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"`
  7086  	// Unique - Is unique or not
  7087  	Unique *bool `json:"unique,omitempty"`
  7088  }
  7089  
  7090  // MongoRoleDefinitionCreateUpdateParameters parameters to create and update an Azure Cosmos DB Mongo Role
  7091  // Definition.
  7092  type MongoRoleDefinitionCreateUpdateParameters struct {
  7093  	// MongoRoleDefinitionResource - Properties to create and update an Azure Cosmos DB Mongo Role Definition.
  7094  	*MongoRoleDefinitionResource `json:"properties,omitempty"`
  7095  }
  7096  
  7097  // MarshalJSON is the custom marshaler for MongoRoleDefinitionCreateUpdateParameters.
  7098  func (mrdcup MongoRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  7099  	objectMap := make(map[string]interface{})
  7100  	if mrdcup.MongoRoleDefinitionResource != nil {
  7101  		objectMap["properties"] = mrdcup.MongoRoleDefinitionResource
  7102  	}
  7103  	return json.Marshal(objectMap)
  7104  }
  7105  
  7106  // UnmarshalJSON is the custom unmarshaler for MongoRoleDefinitionCreateUpdateParameters struct.
  7107  func (mrdcup *MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  7108  	var m map[string]*json.RawMessage
  7109  	err := json.Unmarshal(body, &m)
  7110  	if err != nil {
  7111  		return err
  7112  	}
  7113  	for k, v := range m {
  7114  		switch k {
  7115  		case "properties":
  7116  			if v != nil {
  7117  				var mongoRoleDefinitionResource MongoRoleDefinitionResource
  7118  				err = json.Unmarshal(*v, &mongoRoleDefinitionResource)
  7119  				if err != nil {
  7120  					return err
  7121  				}
  7122  				mrdcup.MongoRoleDefinitionResource = &mongoRoleDefinitionResource
  7123  			}
  7124  		}
  7125  	}
  7126  
  7127  	return nil
  7128  }
  7129  
  7130  // MongoRoleDefinitionGetResults an Azure Cosmos DB Mongo Role Definition.
  7131  type MongoRoleDefinitionGetResults struct {
  7132  	autorest.Response `json:"-"`
  7133  	// MongoRoleDefinitionResource - Properties related to the Mongo Role Definition.
  7134  	*MongoRoleDefinitionResource `json:"properties,omitempty"`
  7135  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7136  	ID *string `json:"id,omitempty"`
  7137  	// Name - READ-ONLY; The name of the database account.
  7138  	Name *string `json:"name,omitempty"`
  7139  	// Type - READ-ONLY; The type of Azure resource.
  7140  	Type *string `json:"type,omitempty"`
  7141  }
  7142  
  7143  // MarshalJSON is the custom marshaler for MongoRoleDefinitionGetResults.
  7144  func (mrdgr MongoRoleDefinitionGetResults) MarshalJSON() ([]byte, error) {
  7145  	objectMap := make(map[string]interface{})
  7146  	if mrdgr.MongoRoleDefinitionResource != nil {
  7147  		objectMap["properties"] = mrdgr.MongoRoleDefinitionResource
  7148  	}
  7149  	return json.Marshal(objectMap)
  7150  }
  7151  
  7152  // UnmarshalJSON is the custom unmarshaler for MongoRoleDefinitionGetResults struct.
  7153  func (mrdgr *MongoRoleDefinitionGetResults) UnmarshalJSON(body []byte) error {
  7154  	var m map[string]*json.RawMessage
  7155  	err := json.Unmarshal(body, &m)
  7156  	if err != nil {
  7157  		return err
  7158  	}
  7159  	for k, v := range m {
  7160  		switch k {
  7161  		case "properties":
  7162  			if v != nil {
  7163  				var mongoRoleDefinitionResource MongoRoleDefinitionResource
  7164  				err = json.Unmarshal(*v, &mongoRoleDefinitionResource)
  7165  				if err != nil {
  7166  					return err
  7167  				}
  7168  				mrdgr.MongoRoleDefinitionResource = &mongoRoleDefinitionResource
  7169  			}
  7170  		case "id":
  7171  			if v != nil {
  7172  				var ID string
  7173  				err = json.Unmarshal(*v, &ID)
  7174  				if err != nil {
  7175  					return err
  7176  				}
  7177  				mrdgr.ID = &ID
  7178  			}
  7179  		case "name":
  7180  			if v != nil {
  7181  				var name string
  7182  				err = json.Unmarshal(*v, &name)
  7183  				if err != nil {
  7184  					return err
  7185  				}
  7186  				mrdgr.Name = &name
  7187  			}
  7188  		case "type":
  7189  			if v != nil {
  7190  				var typeVar string
  7191  				err = json.Unmarshal(*v, &typeVar)
  7192  				if err != nil {
  7193  					return err
  7194  				}
  7195  				mrdgr.Type = &typeVar
  7196  			}
  7197  		}
  7198  	}
  7199  
  7200  	return nil
  7201  }
  7202  
  7203  // MongoRoleDefinitionListResult the relevant Mongo Role Definitions.
  7204  type MongoRoleDefinitionListResult struct {
  7205  	autorest.Response `json:"-"`
  7206  	// Value - READ-ONLY; List of Mongo Role Definitions and their properties.
  7207  	Value *[]MongoRoleDefinitionGetResults `json:"value,omitempty"`
  7208  }
  7209  
  7210  // MarshalJSON is the custom marshaler for MongoRoleDefinitionListResult.
  7211  func (mrdlr MongoRoleDefinitionListResult) MarshalJSON() ([]byte, error) {
  7212  	objectMap := make(map[string]interface{})
  7213  	return json.Marshal(objectMap)
  7214  }
  7215  
  7216  // MongoRoleDefinitionResource azure Cosmos DB Mongo Role Definition resource object.
  7217  type MongoRoleDefinitionResource struct {
  7218  	// RoleName - A user-friendly name for the Role Definition. Must be unique for the database account.
  7219  	RoleName *string `json:"roleName,omitempty"`
  7220  	// Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'BuiltInRole', 'CustomRole'
  7221  	Type MongoRoleDefinitionType `json:"type,omitempty"`
  7222  	// DatabaseName - The database name for which access is being granted for this Role Definition.
  7223  	DatabaseName *string `json:"databaseName,omitempty"`
  7224  	// Privileges - A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
  7225  	Privileges *[]Privilege `json:"privileges,omitempty"`
  7226  	// Roles - The set of roles inherited by this Role Definition.
  7227  	Roles *[]Role `json:"roles,omitempty"`
  7228  }
  7229  
  7230  // MongoUserDefinitionCreateUpdateParameters parameters to create and update an Azure Cosmos DB Mongo User
  7231  // Definition.
  7232  type MongoUserDefinitionCreateUpdateParameters struct {
  7233  	// MongoUserDefinitionResource - Properties to create and update an Azure Cosmos DB Mongo User Definition.
  7234  	*MongoUserDefinitionResource `json:"properties,omitempty"`
  7235  }
  7236  
  7237  // MarshalJSON is the custom marshaler for MongoUserDefinitionCreateUpdateParameters.
  7238  func (mudcup MongoUserDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  7239  	objectMap := make(map[string]interface{})
  7240  	if mudcup.MongoUserDefinitionResource != nil {
  7241  		objectMap["properties"] = mudcup.MongoUserDefinitionResource
  7242  	}
  7243  	return json.Marshal(objectMap)
  7244  }
  7245  
  7246  // UnmarshalJSON is the custom unmarshaler for MongoUserDefinitionCreateUpdateParameters struct.
  7247  func (mudcup *MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  7248  	var m map[string]*json.RawMessage
  7249  	err := json.Unmarshal(body, &m)
  7250  	if err != nil {
  7251  		return err
  7252  	}
  7253  	for k, v := range m {
  7254  		switch k {
  7255  		case "properties":
  7256  			if v != nil {
  7257  				var mongoUserDefinitionResource MongoUserDefinitionResource
  7258  				err = json.Unmarshal(*v, &mongoUserDefinitionResource)
  7259  				if err != nil {
  7260  					return err
  7261  				}
  7262  				mudcup.MongoUserDefinitionResource = &mongoUserDefinitionResource
  7263  			}
  7264  		}
  7265  	}
  7266  
  7267  	return nil
  7268  }
  7269  
  7270  // MongoUserDefinitionGetResults an Azure Cosmos DB User Definition
  7271  type MongoUserDefinitionGetResults struct {
  7272  	autorest.Response `json:"-"`
  7273  	// MongoUserDefinitionResource - Properties related to the User Definition.
  7274  	*MongoUserDefinitionResource `json:"properties,omitempty"`
  7275  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7276  	ID *string `json:"id,omitempty"`
  7277  	// Name - READ-ONLY; The name of the database account.
  7278  	Name *string `json:"name,omitempty"`
  7279  	// Type - READ-ONLY; The type of Azure resource.
  7280  	Type *string `json:"type,omitempty"`
  7281  }
  7282  
  7283  // MarshalJSON is the custom marshaler for MongoUserDefinitionGetResults.
  7284  func (mudgr MongoUserDefinitionGetResults) MarshalJSON() ([]byte, error) {
  7285  	objectMap := make(map[string]interface{})
  7286  	if mudgr.MongoUserDefinitionResource != nil {
  7287  		objectMap["properties"] = mudgr.MongoUserDefinitionResource
  7288  	}
  7289  	return json.Marshal(objectMap)
  7290  }
  7291  
  7292  // UnmarshalJSON is the custom unmarshaler for MongoUserDefinitionGetResults struct.
  7293  func (mudgr *MongoUserDefinitionGetResults) UnmarshalJSON(body []byte) error {
  7294  	var m map[string]*json.RawMessage
  7295  	err := json.Unmarshal(body, &m)
  7296  	if err != nil {
  7297  		return err
  7298  	}
  7299  	for k, v := range m {
  7300  		switch k {
  7301  		case "properties":
  7302  			if v != nil {
  7303  				var mongoUserDefinitionResource MongoUserDefinitionResource
  7304  				err = json.Unmarshal(*v, &mongoUserDefinitionResource)
  7305  				if err != nil {
  7306  					return err
  7307  				}
  7308  				mudgr.MongoUserDefinitionResource = &mongoUserDefinitionResource
  7309  			}
  7310  		case "id":
  7311  			if v != nil {
  7312  				var ID string
  7313  				err = json.Unmarshal(*v, &ID)
  7314  				if err != nil {
  7315  					return err
  7316  				}
  7317  				mudgr.ID = &ID
  7318  			}
  7319  		case "name":
  7320  			if v != nil {
  7321  				var name string
  7322  				err = json.Unmarshal(*v, &name)
  7323  				if err != nil {
  7324  					return err
  7325  				}
  7326  				mudgr.Name = &name
  7327  			}
  7328  		case "type":
  7329  			if v != nil {
  7330  				var typeVar string
  7331  				err = json.Unmarshal(*v, &typeVar)
  7332  				if err != nil {
  7333  					return err
  7334  				}
  7335  				mudgr.Type = &typeVar
  7336  			}
  7337  		}
  7338  	}
  7339  
  7340  	return nil
  7341  }
  7342  
  7343  // MongoUserDefinitionListResult the relevant User Definition.
  7344  type MongoUserDefinitionListResult struct {
  7345  	autorest.Response `json:"-"`
  7346  	// Value - READ-ONLY; List of User Definition and their properties
  7347  	Value *[]MongoUserDefinitionGetResults `json:"value,omitempty"`
  7348  }
  7349  
  7350  // MarshalJSON is the custom marshaler for MongoUserDefinitionListResult.
  7351  func (mudlr MongoUserDefinitionListResult) MarshalJSON() ([]byte, error) {
  7352  	objectMap := make(map[string]interface{})
  7353  	return json.Marshal(objectMap)
  7354  }
  7355  
  7356  // MongoUserDefinitionResource azure Cosmos DB Mongo User Definition resource object.
  7357  type MongoUserDefinitionResource struct {
  7358  	// UserName - The user name for User Definition.
  7359  	UserName *string `json:"userName,omitempty"`
  7360  	// Password - The password for User Definition. Response does not contain user password.
  7361  	Password *string `json:"password,omitempty"`
  7362  	// DatabaseName - The database name for which access is being granted for this User Definition.
  7363  	DatabaseName *string `json:"databaseName,omitempty"`
  7364  	// CustomData - A custom definition for the USer Definition.
  7365  	CustomData *string `json:"customData,omitempty"`
  7366  	// Roles - The set of roles inherited by the User Definition.
  7367  	Roles *[]Role `json:"roles,omitempty"`
  7368  	// Mechanisms - The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256.
  7369  	Mechanisms *string `json:"mechanisms,omitempty"`
  7370  }
  7371  
  7372  // NotebookWorkspace a notebook workspace resource
  7373  type NotebookWorkspace struct {
  7374  	autorest.Response `json:"-"`
  7375  	// NotebookWorkspaceProperties - Resource properties.
  7376  	*NotebookWorkspaceProperties `json:"properties,omitempty"`
  7377  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7378  	ID *string `json:"id,omitempty"`
  7379  	// Name - READ-ONLY; The name of the database account.
  7380  	Name *string `json:"name,omitempty"`
  7381  	// Type - READ-ONLY; The type of Azure resource.
  7382  	Type *string `json:"type,omitempty"`
  7383  }
  7384  
  7385  // MarshalJSON is the custom marshaler for NotebookWorkspace.
  7386  func (nw NotebookWorkspace) MarshalJSON() ([]byte, error) {
  7387  	objectMap := make(map[string]interface{})
  7388  	if nw.NotebookWorkspaceProperties != nil {
  7389  		objectMap["properties"] = nw.NotebookWorkspaceProperties
  7390  	}
  7391  	return json.Marshal(objectMap)
  7392  }
  7393  
  7394  // UnmarshalJSON is the custom unmarshaler for NotebookWorkspace struct.
  7395  func (nw *NotebookWorkspace) UnmarshalJSON(body []byte) error {
  7396  	var m map[string]*json.RawMessage
  7397  	err := json.Unmarshal(body, &m)
  7398  	if err != nil {
  7399  		return err
  7400  	}
  7401  	for k, v := range m {
  7402  		switch k {
  7403  		case "properties":
  7404  			if v != nil {
  7405  				var notebookWorkspaceProperties NotebookWorkspaceProperties
  7406  				err = json.Unmarshal(*v, &notebookWorkspaceProperties)
  7407  				if err != nil {
  7408  					return err
  7409  				}
  7410  				nw.NotebookWorkspaceProperties = &notebookWorkspaceProperties
  7411  			}
  7412  		case "id":
  7413  			if v != nil {
  7414  				var ID string
  7415  				err = json.Unmarshal(*v, &ID)
  7416  				if err != nil {
  7417  					return err
  7418  				}
  7419  				nw.ID = &ID
  7420  			}
  7421  		case "name":
  7422  			if v != nil {
  7423  				var name string
  7424  				err = json.Unmarshal(*v, &name)
  7425  				if err != nil {
  7426  					return err
  7427  				}
  7428  				nw.Name = &name
  7429  			}
  7430  		case "type":
  7431  			if v != nil {
  7432  				var typeVar string
  7433  				err = json.Unmarshal(*v, &typeVar)
  7434  				if err != nil {
  7435  					return err
  7436  				}
  7437  				nw.Type = &typeVar
  7438  			}
  7439  		}
  7440  	}
  7441  
  7442  	return nil
  7443  }
  7444  
  7445  // NotebookWorkspaceConnectionInfoResult the connection info for the given notebook workspace
  7446  type NotebookWorkspaceConnectionInfoResult struct {
  7447  	autorest.Response `json:"-"`
  7448  	// AuthToken - READ-ONLY; Specifies auth token used for connecting to Notebook server (uses token-based auth).
  7449  	AuthToken *string `json:"authToken,omitempty"`
  7450  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  7451  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  7452  }
  7453  
  7454  // MarshalJSON is the custom marshaler for NotebookWorkspaceConnectionInfoResult.
  7455  func (nwcir NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error) {
  7456  	objectMap := make(map[string]interface{})
  7457  	return json.Marshal(objectMap)
  7458  }
  7459  
  7460  // NotebookWorkspaceCreateUpdateParameters parameters to create a notebook workspace resource
  7461  type NotebookWorkspaceCreateUpdateParameters struct {
  7462  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7463  	ID *string `json:"id,omitempty"`
  7464  	// Name - READ-ONLY; The name of the database account.
  7465  	Name *string `json:"name,omitempty"`
  7466  	// Type - READ-ONLY; The type of Azure resource.
  7467  	Type *string `json:"type,omitempty"`
  7468  }
  7469  
  7470  // MarshalJSON is the custom marshaler for NotebookWorkspaceCreateUpdateParameters.
  7471  func (nwcup NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  7472  	objectMap := make(map[string]interface{})
  7473  	return json.Marshal(objectMap)
  7474  }
  7475  
  7476  // NotebookWorkspaceListResult a list of notebook workspace resources
  7477  type NotebookWorkspaceListResult struct {
  7478  	autorest.Response `json:"-"`
  7479  	// Value - Array of notebook workspace resources
  7480  	Value *[]NotebookWorkspace `json:"value,omitempty"`
  7481  }
  7482  
  7483  // NotebookWorkspaceProperties properties of a notebook workspace resource.
  7484  type NotebookWorkspaceProperties struct {
  7485  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  7486  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  7487  	// Status - READ-ONLY; Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating.
  7488  	Status *string `json:"status,omitempty"`
  7489  }
  7490  
  7491  // MarshalJSON is the custom marshaler for NotebookWorkspaceProperties.
  7492  func (nwp NotebookWorkspaceProperties) MarshalJSON() ([]byte, error) {
  7493  	objectMap := make(map[string]interface{})
  7494  	return json.Marshal(objectMap)
  7495  }
  7496  
  7497  // NotebookWorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  7498  // long-running operation.
  7499  type NotebookWorkspacesCreateOrUpdateFuture struct {
  7500  	azure.FutureAPI
  7501  	// Result returns the result of the asynchronous operation.
  7502  	// If the operation has not completed it will return an error.
  7503  	Result func(NotebookWorkspacesClient) (NotebookWorkspace, error)
  7504  }
  7505  
  7506  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7507  func (future *NotebookWorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  7508  	var azFuture azure.Future
  7509  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7510  		return err
  7511  	}
  7512  	future.FutureAPI = &azFuture
  7513  	future.Result = future.result
  7514  	return nil
  7515  }
  7516  
  7517  // result is the default implementation for NotebookWorkspacesCreateOrUpdateFuture.Result.
  7518  func (future *NotebookWorkspacesCreateOrUpdateFuture) result(client NotebookWorkspacesClient) (nw NotebookWorkspace, err error) {
  7519  	var done bool
  7520  	done, err = future.DoneWithContext(context.Background(), client)
  7521  	if err != nil {
  7522  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  7523  		return
  7524  	}
  7525  	if !done {
  7526  		nw.Response.Response = future.Response()
  7527  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesCreateOrUpdateFuture")
  7528  		return
  7529  	}
  7530  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7531  	if nw.Response.Response, err = future.GetResult(sender); err == nil && nw.Response.Response.StatusCode != http.StatusNoContent {
  7532  		nw, err = client.CreateOrUpdateResponder(nw.Response.Response)
  7533  		if err != nil {
  7534  			err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", nw.Response.Response, "Failure responding to request")
  7535  		}
  7536  	}
  7537  	return
  7538  }
  7539  
  7540  // NotebookWorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a
  7541  // long-running operation.
  7542  type NotebookWorkspacesDeleteFuture struct {
  7543  	azure.FutureAPI
  7544  	// Result returns the result of the asynchronous operation.
  7545  	// If the operation has not completed it will return an error.
  7546  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  7547  }
  7548  
  7549  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7550  func (future *NotebookWorkspacesDeleteFuture) UnmarshalJSON(body []byte) error {
  7551  	var azFuture azure.Future
  7552  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7553  		return err
  7554  	}
  7555  	future.FutureAPI = &azFuture
  7556  	future.Result = future.result
  7557  	return nil
  7558  }
  7559  
  7560  // result is the default implementation for NotebookWorkspacesDeleteFuture.Result.
  7561  func (future *NotebookWorkspacesDeleteFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  7562  	var done bool
  7563  	done, err = future.DoneWithContext(context.Background(), client)
  7564  	if err != nil {
  7565  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesDeleteFuture", "Result", future.Response(), "Polling failure")
  7566  		return
  7567  	}
  7568  	if !done {
  7569  		ar.Response = future.Response()
  7570  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesDeleteFuture")
  7571  		return
  7572  	}
  7573  	ar.Response = future.Response()
  7574  	return
  7575  }
  7576  
  7577  // NotebookWorkspacesRegenerateAuthTokenFuture an abstraction for monitoring and retrieving the results of
  7578  // a long-running operation.
  7579  type NotebookWorkspacesRegenerateAuthTokenFuture struct {
  7580  	azure.FutureAPI
  7581  	// Result returns the result of the asynchronous operation.
  7582  	// If the operation has not completed it will return an error.
  7583  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  7584  }
  7585  
  7586  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7587  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) UnmarshalJSON(body []byte) error {
  7588  	var azFuture azure.Future
  7589  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7590  		return err
  7591  	}
  7592  	future.FutureAPI = &azFuture
  7593  	future.Result = future.result
  7594  	return nil
  7595  }
  7596  
  7597  // result is the default implementation for NotebookWorkspacesRegenerateAuthTokenFuture.Result.
  7598  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  7599  	var done bool
  7600  	done, err = future.DoneWithContext(context.Background(), client)
  7601  	if err != nil {
  7602  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesRegenerateAuthTokenFuture", "Result", future.Response(), "Polling failure")
  7603  		return
  7604  	}
  7605  	if !done {
  7606  		ar.Response = future.Response()
  7607  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesRegenerateAuthTokenFuture")
  7608  		return
  7609  	}
  7610  	ar.Response = future.Response()
  7611  	return
  7612  }
  7613  
  7614  // NotebookWorkspacesStartFuture an abstraction for monitoring and retrieving the results of a long-running
  7615  // operation.
  7616  type NotebookWorkspacesStartFuture struct {
  7617  	azure.FutureAPI
  7618  	// Result returns the result of the asynchronous operation.
  7619  	// If the operation has not completed it will return an error.
  7620  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  7621  }
  7622  
  7623  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7624  func (future *NotebookWorkspacesStartFuture) UnmarshalJSON(body []byte) error {
  7625  	var azFuture azure.Future
  7626  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7627  		return err
  7628  	}
  7629  	future.FutureAPI = &azFuture
  7630  	future.Result = future.result
  7631  	return nil
  7632  }
  7633  
  7634  // result is the default implementation for NotebookWorkspacesStartFuture.Result.
  7635  func (future *NotebookWorkspacesStartFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  7636  	var done bool
  7637  	done, err = future.DoneWithContext(context.Background(), client)
  7638  	if err != nil {
  7639  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesStartFuture", "Result", future.Response(), "Polling failure")
  7640  		return
  7641  	}
  7642  	if !done {
  7643  		ar.Response = future.Response()
  7644  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesStartFuture")
  7645  		return
  7646  	}
  7647  	ar.Response = future.Response()
  7648  	return
  7649  }
  7650  
  7651  // Operation REST API operation
  7652  type Operation struct {
  7653  	// Name - Operation name: {provider}/{resource}/{operation}
  7654  	Name *string `json:"name,omitempty"`
  7655  	// Display - The object that represents the operation.
  7656  	Display *OperationDisplay `json:"display,omitempty"`
  7657  }
  7658  
  7659  // OperationDisplay the object that represents the operation.
  7660  type OperationDisplay struct {
  7661  	// Provider - Service provider: Microsoft.ResourceProvider
  7662  	Provider *string `json:"Provider,omitempty"`
  7663  	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
  7664  	Resource *string `json:"Resource,omitempty"`
  7665  	// Operation - Operation type: Read, write, delete, etc.
  7666  	Operation *string `json:"Operation,omitempty"`
  7667  	// Description - Description of operation
  7668  	Description *string `json:"Description,omitempty"`
  7669  }
  7670  
  7671  // OperationListResult result of the request to list Resource Provider operations. It contains a list of
  7672  // operations and a URL link to get the next set of results.
  7673  type OperationListResult struct {
  7674  	autorest.Response `json:"-"`
  7675  	// Value - List of operations supported by the Resource Provider.
  7676  	Value *[]Operation `json:"value,omitempty"`
  7677  	// NextLink - URL to get the next set of operation list results if there are any.
  7678  	NextLink *string `json:"nextLink,omitempty"`
  7679  }
  7680  
  7681  // OperationListResultIterator provides access to a complete listing of Operation values.
  7682  type OperationListResultIterator struct {
  7683  	i    int
  7684  	page OperationListResultPage
  7685  }
  7686  
  7687  // NextWithContext advances to the next value.  If there was an error making
  7688  // the request the iterator does not advance and the error is returned.
  7689  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  7690  	if tracing.IsEnabled() {
  7691  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  7692  		defer func() {
  7693  			sc := -1
  7694  			if iter.Response().Response.Response != nil {
  7695  				sc = iter.Response().Response.Response.StatusCode
  7696  			}
  7697  			tracing.EndSpan(ctx, sc, err)
  7698  		}()
  7699  	}
  7700  	iter.i++
  7701  	if iter.i < len(iter.page.Values()) {
  7702  		return nil
  7703  	}
  7704  	err = iter.page.NextWithContext(ctx)
  7705  	if err != nil {
  7706  		iter.i--
  7707  		return err
  7708  	}
  7709  	iter.i = 0
  7710  	return nil
  7711  }
  7712  
  7713  // Next advances to the next value.  If there was an error making
  7714  // the request the iterator does not advance and the error is returned.
  7715  // Deprecated: Use NextWithContext() instead.
  7716  func (iter *OperationListResultIterator) Next() error {
  7717  	return iter.NextWithContext(context.Background())
  7718  }
  7719  
  7720  // NotDone returns true if the enumeration should be started or is not yet complete.
  7721  func (iter OperationListResultIterator) NotDone() bool {
  7722  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  7723  }
  7724  
  7725  // Response returns the raw server response from the last page request.
  7726  func (iter OperationListResultIterator) Response() OperationListResult {
  7727  	return iter.page.Response()
  7728  }
  7729  
  7730  // Value returns the current value or a zero-initialized value if the
  7731  // iterator has advanced beyond the end of the collection.
  7732  func (iter OperationListResultIterator) Value() Operation {
  7733  	if !iter.page.NotDone() {
  7734  		return Operation{}
  7735  	}
  7736  	return iter.page.Values()[iter.i]
  7737  }
  7738  
  7739  // Creates a new instance of the OperationListResultIterator type.
  7740  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  7741  	return OperationListResultIterator{page: page}
  7742  }
  7743  
  7744  // IsEmpty returns true if the ListResult contains no values.
  7745  func (olr OperationListResult) IsEmpty() bool {
  7746  	return olr.Value == nil || len(*olr.Value) == 0
  7747  }
  7748  
  7749  // hasNextLink returns true if the NextLink is not empty.
  7750  func (olr OperationListResult) hasNextLink() bool {
  7751  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  7752  }
  7753  
  7754  // operationListResultPreparer prepares a request to retrieve the next set of results.
  7755  // It returns nil if no more results exist.
  7756  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  7757  	if !olr.hasNextLink() {
  7758  		return nil, nil
  7759  	}
  7760  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  7761  		autorest.AsJSON(),
  7762  		autorest.AsGet(),
  7763  		autorest.WithBaseURL(to.String(olr.NextLink)))
  7764  }
  7765  
  7766  // OperationListResultPage contains a page of Operation values.
  7767  type OperationListResultPage struct {
  7768  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  7769  	olr OperationListResult
  7770  }
  7771  
  7772  // NextWithContext advances to the next page of values.  If there was an error making
  7773  // the request the page does not advance and the error is returned.
  7774  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  7775  	if tracing.IsEnabled() {
  7776  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  7777  		defer func() {
  7778  			sc := -1
  7779  			if page.Response().Response.Response != nil {
  7780  				sc = page.Response().Response.Response.StatusCode
  7781  			}
  7782  			tracing.EndSpan(ctx, sc, err)
  7783  		}()
  7784  	}
  7785  	for {
  7786  		next, err := page.fn(ctx, page.olr)
  7787  		if err != nil {
  7788  			return err
  7789  		}
  7790  		page.olr = next
  7791  		if !next.hasNextLink() || !next.IsEmpty() {
  7792  			break
  7793  		}
  7794  	}
  7795  	return nil
  7796  }
  7797  
  7798  // Next advances to the next page of values.  If there was an error making
  7799  // the request the page does not advance and the error is returned.
  7800  // Deprecated: Use NextWithContext() instead.
  7801  func (page *OperationListResultPage) Next() error {
  7802  	return page.NextWithContext(context.Background())
  7803  }
  7804  
  7805  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7806  func (page OperationListResultPage) NotDone() bool {
  7807  	return !page.olr.IsEmpty()
  7808  }
  7809  
  7810  // Response returns the raw server response from the last page request.
  7811  func (page OperationListResultPage) Response() OperationListResult {
  7812  	return page.olr
  7813  }
  7814  
  7815  // Values returns the slice of values for the current page or nil if there are no values.
  7816  func (page OperationListResultPage) Values() []Operation {
  7817  	if page.olr.IsEmpty() {
  7818  		return nil
  7819  	}
  7820  	return *page.olr.Value
  7821  }
  7822  
  7823  // Creates a new instance of the OperationListResultPage type.
  7824  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  7825  	return OperationListResultPage{
  7826  		fn:  getNextPage,
  7827  		olr: cur,
  7828  	}
  7829  }
  7830  
  7831  // OptionsResource cosmos DB options resource object
  7832  type OptionsResource struct {
  7833  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  7834  	Throughput *int32 `json:"throughput,omitempty"`
  7835  	// AutoscaleSettings - Specifies the Autoscale settings.
  7836  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  7837  }
  7838  
  7839  // PartitionMetric the metric values for a single partition.
  7840  type PartitionMetric struct {
  7841  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the metric values.
  7842  	PartitionID *string `json:"partitionId,omitempty"`
  7843  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the metric values.
  7844  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  7845  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  7846  	StartTime *date.Time `json:"startTime,omitempty"`
  7847  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  7848  	EndTime *date.Time `json:"endTime,omitempty"`
  7849  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  7850  	TimeGrain *string `json:"timeGrain,omitempty"`
  7851  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
  7852  	Unit UnitType `json:"unit,omitempty"`
  7853  	// Name - READ-ONLY; The name information for the metric.
  7854  	Name *MetricName `json:"name,omitempty"`
  7855  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  7856  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  7857  }
  7858  
  7859  // MarshalJSON is the custom marshaler for PartitionMetric.
  7860  func (pm PartitionMetric) MarshalJSON() ([]byte, error) {
  7861  	objectMap := make(map[string]interface{})
  7862  	if pm.Unit != "" {
  7863  		objectMap["unit"] = pm.Unit
  7864  	}
  7865  	return json.Marshal(objectMap)
  7866  }
  7867  
  7868  // PartitionMetricListResult the response to a list partition metrics request.
  7869  type PartitionMetricListResult struct {
  7870  	autorest.Response `json:"-"`
  7871  	// Value - READ-ONLY; The list of partition-level metrics for the account.
  7872  	Value *[]PartitionMetric `json:"value,omitempty"`
  7873  }
  7874  
  7875  // MarshalJSON is the custom marshaler for PartitionMetricListResult.
  7876  func (pmlr PartitionMetricListResult) MarshalJSON() ([]byte, error) {
  7877  	objectMap := make(map[string]interface{})
  7878  	return json.Marshal(objectMap)
  7879  }
  7880  
  7881  // PartitionUsage the partition level usage data for a usage request.
  7882  type PartitionUsage struct {
  7883  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the usages.
  7884  	PartitionID *string `json:"partitionId,omitempty"`
  7885  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the usages.
  7886  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  7887  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
  7888  	Unit UnitType `json:"unit,omitempty"`
  7889  	// Name - READ-ONLY; The name information for the metric.
  7890  	Name *MetricName `json:"name,omitempty"`
  7891  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
  7892  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
  7893  	// Limit - READ-ONLY; Maximum value for this metric
  7894  	Limit *int64 `json:"limit,omitempty"`
  7895  	// CurrentValue - READ-ONLY; Current value for this metric
  7896  	CurrentValue *int64 `json:"currentValue,omitempty"`
  7897  }
  7898  
  7899  // MarshalJSON is the custom marshaler for PartitionUsage.
  7900  func (pu PartitionUsage) MarshalJSON() ([]byte, error) {
  7901  	objectMap := make(map[string]interface{})
  7902  	if pu.Unit != "" {
  7903  		objectMap["unit"] = pu.Unit
  7904  	}
  7905  	return json.Marshal(objectMap)
  7906  }
  7907  
  7908  // PartitionUsagesResult the response to a list partition level usage request.
  7909  type PartitionUsagesResult struct {
  7910  	autorest.Response `json:"-"`
  7911  	// Value - READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric
  7912  	Value *[]PartitionUsage `json:"value,omitempty"`
  7913  }
  7914  
  7915  // MarshalJSON is the custom marshaler for PartitionUsagesResult.
  7916  func (pur PartitionUsagesResult) MarshalJSON() ([]byte, error) {
  7917  	objectMap := make(map[string]interface{})
  7918  	return json.Marshal(objectMap)
  7919  }
  7920  
  7921  // PercentileMetric percentile Metric data
  7922  type PercentileMetric struct {
  7923  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  7924  	StartTime *date.Time `json:"startTime,omitempty"`
  7925  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  7926  	EndTime *date.Time `json:"endTime,omitempty"`
  7927  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  7928  	TimeGrain *string `json:"timeGrain,omitempty"`
  7929  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
  7930  	Unit UnitType `json:"unit,omitempty"`
  7931  	// Name - READ-ONLY; The name information for the metric.
  7932  	Name *MetricName `json:"name,omitempty"`
  7933  	// MetricValues - READ-ONLY; The percentile metric values for the specified time window and timestep.
  7934  	MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"`
  7935  }
  7936  
  7937  // MarshalJSON is the custom marshaler for PercentileMetric.
  7938  func (pm PercentileMetric) MarshalJSON() ([]byte, error) {
  7939  	objectMap := make(map[string]interface{})
  7940  	if pm.Unit != "" {
  7941  		objectMap["unit"] = pm.Unit
  7942  	}
  7943  	return json.Marshal(objectMap)
  7944  }
  7945  
  7946  // PercentileMetricListResult the response to a list percentile metrics request.
  7947  type PercentileMetricListResult struct {
  7948  	autorest.Response `json:"-"`
  7949  	// Value - READ-ONLY; The list of percentile metrics for the account.
  7950  	Value *[]PercentileMetric `json:"value,omitempty"`
  7951  }
  7952  
  7953  // MarshalJSON is the custom marshaler for PercentileMetricListResult.
  7954  func (pmlr PercentileMetricListResult) MarshalJSON() ([]byte, error) {
  7955  	objectMap := make(map[string]interface{})
  7956  	return json.Marshal(objectMap)
  7957  }
  7958  
  7959  // PercentileMetricValue represents percentile metrics values.
  7960  type PercentileMetricValue struct {
  7961  	// P10 - READ-ONLY; The 10th percentile value for the metric.
  7962  	P10 *float64 `json:"P10,omitempty"`
  7963  	// P25 - READ-ONLY; The 25th percentile value for the metric.
  7964  	P25 *float64 `json:"P25,omitempty"`
  7965  	// P50 - READ-ONLY; The 50th percentile value for the metric.
  7966  	P50 *float64 `json:"P50,omitempty"`
  7967  	// P75 - READ-ONLY; The 75th percentile value for the metric.
  7968  	P75 *float64 `json:"P75,omitempty"`
  7969  	// P90 - READ-ONLY; The 90th percentile value for the metric.
  7970  	P90 *float64 `json:"P90,omitempty"`
  7971  	// P95 - READ-ONLY; The 95th percentile value for the metric.
  7972  	P95 *float64 `json:"P95,omitempty"`
  7973  	// P99 - READ-ONLY; The 99th percentile value for the metric.
  7974  	P99 *float64 `json:"P99,omitempty"`
  7975  	// Count - READ-ONLY; The number of values for the metric.
  7976  	Count *float64 `json:"_count,omitempty"`
  7977  	// Average - READ-ONLY; The average value of the metric.
  7978  	Average *float64 `json:"average,omitempty"`
  7979  	// Maximum - READ-ONLY; The max value of the metric.
  7980  	Maximum *float64 `json:"maximum,omitempty"`
  7981  	// Minimum - READ-ONLY; The min value of the metric.
  7982  	Minimum *float64 `json:"minimum,omitempty"`
  7983  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  7984  	Timestamp *date.Time `json:"timestamp,omitempty"`
  7985  	// Total - READ-ONLY; The total value of the metric.
  7986  	Total *float64 `json:"total,omitempty"`
  7987  }
  7988  
  7989  // MarshalJSON is the custom marshaler for PercentileMetricValue.
  7990  func (pmv PercentileMetricValue) MarshalJSON() ([]byte, error) {
  7991  	objectMap := make(map[string]interface{})
  7992  	return json.Marshal(objectMap)
  7993  }
  7994  
  7995  // PeriodicModeBackupPolicy the object representing periodic mode backup policy.
  7996  type PeriodicModeBackupPolicy struct {
  7997  	// PeriodicModeProperties - Configuration values for periodic mode backup
  7998  	PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"`
  7999  	// MigrationState - The object representing the state of the migration between the backup policies.
  8000  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
  8001  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  8002  	Type Type `json:"type,omitempty"`
  8003  }
  8004  
  8005  // MarshalJSON is the custom marshaler for PeriodicModeBackupPolicy.
  8006  func (pmbp PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) {
  8007  	pmbp.Type = TypePeriodic
  8008  	objectMap := make(map[string]interface{})
  8009  	if pmbp.PeriodicModeProperties != nil {
  8010  		objectMap["periodicModeProperties"] = pmbp.PeriodicModeProperties
  8011  	}
  8012  	if pmbp.MigrationState != nil {
  8013  		objectMap["migrationState"] = pmbp.MigrationState
  8014  	}
  8015  	if pmbp.Type != "" {
  8016  		objectMap["type"] = pmbp.Type
  8017  	}
  8018  	return json.Marshal(objectMap)
  8019  }
  8020  
  8021  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  8022  func (pmbp PeriodicModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  8023  	return &pmbp, true
  8024  }
  8025  
  8026  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  8027  func (pmbp PeriodicModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  8028  	return nil, false
  8029  }
  8030  
  8031  // AsBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  8032  func (pmbp PeriodicModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  8033  	return nil, false
  8034  }
  8035  
  8036  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  8037  func (pmbp PeriodicModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  8038  	return &pmbp, true
  8039  }
  8040  
  8041  // PeriodicModeProperties configuration values for periodic mode backup
  8042  type PeriodicModeProperties struct {
  8043  	// BackupIntervalInMinutes - An integer representing the interval in minutes between two backups
  8044  	BackupIntervalInMinutes *int32 `json:"backupIntervalInMinutes,omitempty"`
  8045  	// BackupRetentionIntervalInHours - An integer representing the time (in hours) that each backup is retained
  8046  	BackupRetentionIntervalInHours *int32 `json:"backupRetentionIntervalInHours,omitempty"`
  8047  	// BackupStorageRedundancy - Enum to indicate type of backup residency. Possible values include: 'Geo', 'Local', 'Zone'
  8048  	BackupStorageRedundancy BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty"`
  8049  }
  8050  
  8051  // Permission the set of data plane operations permitted through this Role Definition.
  8052  type Permission struct {
  8053  	// DataActions - An array of data actions that are allowed.
  8054  	DataActions *[]string `json:"dataActions,omitempty"`
  8055  	// NotDataActions - An array of data actions that are denied.
  8056  	NotDataActions *[]string `json:"notDataActions,omitempty"`
  8057  }
  8058  
  8059  // PrivateEndpointConnection a private endpoint connection
  8060  type PrivateEndpointConnection struct {
  8061  	autorest.Response `json:"-"`
  8062  	// PrivateEndpointConnectionProperties - Resource properties.
  8063  	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
  8064  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  8065  	ID *string `json:"id,omitempty"`
  8066  	// Name - READ-ONLY; The name of the resource
  8067  	Name *string `json:"name,omitempty"`
  8068  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  8069  	Type *string `json:"type,omitempty"`
  8070  }
  8071  
  8072  // MarshalJSON is the custom marshaler for PrivateEndpointConnection.
  8073  func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
  8074  	objectMap := make(map[string]interface{})
  8075  	if pec.PrivateEndpointConnectionProperties != nil {
  8076  		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
  8077  	}
  8078  	return json.Marshal(objectMap)
  8079  }
  8080  
  8081  // UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
  8082  func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
  8083  	var m map[string]*json.RawMessage
  8084  	err := json.Unmarshal(body, &m)
  8085  	if err != nil {
  8086  		return err
  8087  	}
  8088  	for k, v := range m {
  8089  		switch k {
  8090  		case "properties":
  8091  			if v != nil {
  8092  				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
  8093  				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
  8094  				if err != nil {
  8095  					return err
  8096  				}
  8097  				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
  8098  			}
  8099  		case "id":
  8100  			if v != nil {
  8101  				var ID string
  8102  				err = json.Unmarshal(*v, &ID)
  8103  				if err != nil {
  8104  					return err
  8105  				}
  8106  				pec.ID = &ID
  8107  			}
  8108  		case "name":
  8109  			if v != nil {
  8110  				var name string
  8111  				err = json.Unmarshal(*v, &name)
  8112  				if err != nil {
  8113  					return err
  8114  				}
  8115  				pec.Name = &name
  8116  			}
  8117  		case "type":
  8118  			if v != nil {
  8119  				var typeVar string
  8120  				err = json.Unmarshal(*v, &typeVar)
  8121  				if err != nil {
  8122  					return err
  8123  				}
  8124  				pec.Type = &typeVar
  8125  			}
  8126  		}
  8127  	}
  8128  
  8129  	return nil
  8130  }
  8131  
  8132  // PrivateEndpointConnectionListResult a list of private endpoint connections
  8133  type PrivateEndpointConnectionListResult struct {
  8134  	autorest.Response `json:"-"`
  8135  	// Value - Array of private endpoint connections
  8136  	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
  8137  }
  8138  
  8139  // PrivateEndpointConnectionProperties properties of a private endpoint connection.
  8140  type PrivateEndpointConnectionProperties struct {
  8141  	// PrivateEndpoint - Private endpoint which the connection belongs to.
  8142  	PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"`
  8143  	// PrivateLinkServiceConnectionState - Connection State of the Private Endpoint Connection.
  8144  	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"`
  8145  	// GroupID - Group id of the private endpoint.
  8146  	GroupID *string `json:"groupId,omitempty"`
  8147  	// ProvisioningState - Provisioning state of the private endpoint.
  8148  	ProvisioningState *string `json:"provisioningState,omitempty"`
  8149  }
  8150  
  8151  // PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  8152  // of a long-running operation.
  8153  type PrivateEndpointConnectionsCreateOrUpdateFuture struct {
  8154  	azure.FutureAPI
  8155  	// Result returns the result of the asynchronous operation.
  8156  	// If the operation has not completed it will return an error.
  8157  	Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
  8158  }
  8159  
  8160  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8161  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  8162  	var azFuture azure.Future
  8163  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8164  		return err
  8165  	}
  8166  	future.FutureAPI = &azFuture
  8167  	future.Result = future.result
  8168  	return nil
  8169  }
  8170  
  8171  // result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result.
  8172  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) {
  8173  	var done bool
  8174  	done, err = future.DoneWithContext(context.Background(), client)
  8175  	if err != nil {
  8176  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  8177  		return
  8178  	}
  8179  	if !done {
  8180  		pec.Response.Response = future.Response()
  8181  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture")
  8182  		return
  8183  	}
  8184  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8185  	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
  8186  		pec, err = client.CreateOrUpdateResponder(pec.Response.Response)
  8187  		if err != nil {
  8188  			err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
  8189  		}
  8190  	}
  8191  	return
  8192  }
  8193  
  8194  // PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
  8195  // long-running operation.
  8196  type PrivateEndpointConnectionsDeleteFuture struct {
  8197  	azure.FutureAPI
  8198  	// Result returns the result of the asynchronous operation.
  8199  	// If the operation has not completed it will return an error.
  8200  	Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
  8201  }
  8202  
  8203  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8204  func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
  8205  	var azFuture azure.Future
  8206  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8207  		return err
  8208  	}
  8209  	future.FutureAPI = &azFuture
  8210  	future.Result = future.result
  8211  	return nil
  8212  }
  8213  
  8214  // result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
  8215  func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
  8216  	var done bool
  8217  	done, err = future.DoneWithContext(context.Background(), client)
  8218  	if err != nil {
  8219  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
  8220  		return
  8221  	}
  8222  	if !done {
  8223  		ar.Response = future.Response()
  8224  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsDeleteFuture")
  8225  		return
  8226  	}
  8227  	ar.Response = future.Response()
  8228  	return
  8229  }
  8230  
  8231  // PrivateEndpointProperty private endpoint which the connection belongs to.
  8232  type PrivateEndpointProperty struct {
  8233  	// ID - Resource id of the private endpoint.
  8234  	ID *string `json:"id,omitempty"`
  8235  }
  8236  
  8237  // PrivateLinkResource a private link resource
  8238  type PrivateLinkResource struct {
  8239  	autorest.Response `json:"-"`
  8240  	// PrivateLinkResourceProperties - Resource properties.
  8241  	*PrivateLinkResourceProperties `json:"properties,omitempty"`
  8242  	// ID - READ-ONLY; The unique resource identifier of the database account.
  8243  	ID *string `json:"id,omitempty"`
  8244  	// Name - READ-ONLY; The name of the database account.
  8245  	Name *string `json:"name,omitempty"`
  8246  	// Type - READ-ONLY; The type of Azure resource.
  8247  	Type *string `json:"type,omitempty"`
  8248  }
  8249  
  8250  // MarshalJSON is the custom marshaler for PrivateLinkResource.
  8251  func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
  8252  	objectMap := make(map[string]interface{})
  8253  	if plr.PrivateLinkResourceProperties != nil {
  8254  		objectMap["properties"] = plr.PrivateLinkResourceProperties
  8255  	}
  8256  	return json.Marshal(objectMap)
  8257  }
  8258  
  8259  // UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
  8260  func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
  8261  	var m map[string]*json.RawMessage
  8262  	err := json.Unmarshal(body, &m)
  8263  	if err != nil {
  8264  		return err
  8265  	}
  8266  	for k, v := range m {
  8267  		switch k {
  8268  		case "properties":
  8269  			if v != nil {
  8270  				var privateLinkResourceProperties PrivateLinkResourceProperties
  8271  				err = json.Unmarshal(*v, &privateLinkResourceProperties)
  8272  				if err != nil {
  8273  					return err
  8274  				}
  8275  				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
  8276  			}
  8277  		case "id":
  8278  			if v != nil {
  8279  				var ID string
  8280  				err = json.Unmarshal(*v, &ID)
  8281  				if err != nil {
  8282  					return err
  8283  				}
  8284  				plr.ID = &ID
  8285  			}
  8286  		case "name":
  8287  			if v != nil {
  8288  				var name string
  8289  				err = json.Unmarshal(*v, &name)
  8290  				if err != nil {
  8291  					return err
  8292  				}
  8293  				plr.Name = &name
  8294  			}
  8295  		case "type":
  8296  			if v != nil {
  8297  				var typeVar string
  8298  				err = json.Unmarshal(*v, &typeVar)
  8299  				if err != nil {
  8300  					return err
  8301  				}
  8302  				plr.Type = &typeVar
  8303  			}
  8304  		}
  8305  	}
  8306  
  8307  	return nil
  8308  }
  8309  
  8310  // PrivateLinkResourceListResult a list of private link resources
  8311  type PrivateLinkResourceListResult struct {
  8312  	autorest.Response `json:"-"`
  8313  	// Value - Array of private link resources
  8314  	Value *[]PrivateLinkResource `json:"value,omitempty"`
  8315  }
  8316  
  8317  // PrivateLinkResourceProperties properties of a private link resource.
  8318  type PrivateLinkResourceProperties struct {
  8319  	// GroupID - READ-ONLY; The private link resource group id.
  8320  	GroupID *string `json:"groupId,omitempty"`
  8321  	// RequiredMembers - READ-ONLY; The private link resource required member names.
  8322  	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
  8323  	// RequiredZoneNames - READ-ONLY; The private link resource required zone names.
  8324  	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
  8325  }
  8326  
  8327  // MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
  8328  func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
  8329  	objectMap := make(map[string]interface{})
  8330  	return json.Marshal(objectMap)
  8331  }
  8332  
  8333  // PrivateLinkServiceConnectionStateProperty connection State of the Private Endpoint Connection.
  8334  type PrivateLinkServiceConnectionStateProperty struct {
  8335  	// Status - The private link service connection status.
  8336  	Status *string `json:"status,omitempty"`
  8337  	// Description - The private link service connection description.
  8338  	Description *string `json:"description,omitempty"`
  8339  	// ActionsRequired - READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect)
  8340  	ActionsRequired *string `json:"actionsRequired,omitempty"`
  8341  }
  8342  
  8343  // MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionStateProperty.
  8344  func (plscsp PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) {
  8345  	objectMap := make(map[string]interface{})
  8346  	if plscsp.Status != nil {
  8347  		objectMap["status"] = plscsp.Status
  8348  	}
  8349  	if plscsp.Description != nil {
  8350  		objectMap["description"] = plscsp.Description
  8351  	}
  8352  	return json.Marshal(objectMap)
  8353  }
  8354  
  8355  // Privilege the set of data plane operations permitted through this Role Definition.
  8356  type Privilege struct {
  8357  	// Resource - An Azure Cosmos DB Mongo DB Resource.
  8358  	Resource *PrivilegeResource `json:"resource,omitempty"`
  8359  	// Actions - An array of actions that are allowed.
  8360  	Actions *[]string `json:"actions,omitempty"`
  8361  }
  8362  
  8363  // PrivilegeResource an Azure Cosmos DB Mongo DB Resource.
  8364  type PrivilegeResource struct {
  8365  	// Db - The database name the role is applied.
  8366  	Db *string `json:"db,omitempty"`
  8367  	// Collection - The collection name the role is applied.
  8368  	Collection *string `json:"collection,omitempty"`
  8369  }
  8370  
  8371  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  8372  // have tags and a location
  8373  type ProxyResource struct {
  8374  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  8375  	ID *string `json:"id,omitempty"`
  8376  	// Name - READ-ONLY; The name of the resource
  8377  	Name *string `json:"name,omitempty"`
  8378  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  8379  	Type *string `json:"type,omitempty"`
  8380  }
  8381  
  8382  // MarshalJSON is the custom marshaler for ProxyResource.
  8383  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  8384  	objectMap := make(map[string]interface{})
  8385  	return json.Marshal(objectMap)
  8386  }
  8387  
  8388  // RegionalServiceResource resource for a regional service location.
  8389  type RegionalServiceResource struct {
  8390  	// Name - READ-ONLY; The regional service name.
  8391  	Name *string `json:"name,omitempty"`
  8392  	// Location - READ-ONLY; The location name.
  8393  	Location *string `json:"location,omitempty"`
  8394  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  8395  	Status ServiceStatus `json:"status,omitempty"`
  8396  }
  8397  
  8398  // MarshalJSON is the custom marshaler for RegionalServiceResource.
  8399  func (rsr RegionalServiceResource) MarshalJSON() ([]byte, error) {
  8400  	objectMap := make(map[string]interface{})
  8401  	return json.Marshal(objectMap)
  8402  }
  8403  
  8404  // RegionForOnlineOffline cosmos DB region to online or offline.
  8405  type RegionForOnlineOffline struct {
  8406  	// Region - Cosmos DB region, with spaces between words and each word capitalized.
  8407  	Region *string `json:"region,omitempty"`
  8408  }
  8409  
  8410  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  8411  type Resource struct {
  8412  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  8413  	ID *string `json:"id,omitempty"`
  8414  	// Name - READ-ONLY; The name of the resource
  8415  	Name *string `json:"name,omitempty"`
  8416  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  8417  	Type *string `json:"type,omitempty"`
  8418  }
  8419  
  8420  // MarshalJSON is the custom marshaler for Resource.
  8421  func (r Resource) MarshalJSON() ([]byte, error) {
  8422  	objectMap := make(map[string]interface{})
  8423  	return json.Marshal(objectMap)
  8424  }
  8425  
  8426  // RestorableDatabaseAccountGetResult a Azure Cosmos DB restorable database account.
  8427  type RestorableDatabaseAccountGetResult struct {
  8428  	autorest.Response `json:"-"`
  8429  	// RestorableDatabaseAccountProperties - The properties of a restorable database account.
  8430  	*RestorableDatabaseAccountProperties `json:"properties,omitempty"`
  8431  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8432  	ID *string `json:"id,omitempty"`
  8433  	// Name - READ-ONLY; The name of the ARM resource.
  8434  	Name *string `json:"name,omitempty"`
  8435  	// Type - READ-ONLY; The type of Azure resource.
  8436  	Type *string `json:"type,omitempty"`
  8437  	// Location - The location of the resource group to which the resource belongs.
  8438  	Location *string `json:"location,omitempty"`
  8439  }
  8440  
  8441  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountGetResult.
  8442  func (rdagr RestorableDatabaseAccountGetResult) MarshalJSON() ([]byte, error) {
  8443  	objectMap := make(map[string]interface{})
  8444  	if rdagr.RestorableDatabaseAccountProperties != nil {
  8445  		objectMap["properties"] = rdagr.RestorableDatabaseAccountProperties
  8446  	}
  8447  	if rdagr.Location != nil {
  8448  		objectMap["location"] = rdagr.Location
  8449  	}
  8450  	return json.Marshal(objectMap)
  8451  }
  8452  
  8453  // UnmarshalJSON is the custom unmarshaler for RestorableDatabaseAccountGetResult struct.
  8454  func (rdagr *RestorableDatabaseAccountGetResult) UnmarshalJSON(body []byte) error {
  8455  	var m map[string]*json.RawMessage
  8456  	err := json.Unmarshal(body, &m)
  8457  	if err != nil {
  8458  		return err
  8459  	}
  8460  	for k, v := range m {
  8461  		switch k {
  8462  		case "properties":
  8463  			if v != nil {
  8464  				var restorableDatabaseAccountProperties RestorableDatabaseAccountProperties
  8465  				err = json.Unmarshal(*v, &restorableDatabaseAccountProperties)
  8466  				if err != nil {
  8467  					return err
  8468  				}
  8469  				rdagr.RestorableDatabaseAccountProperties = &restorableDatabaseAccountProperties
  8470  			}
  8471  		case "id":
  8472  			if v != nil {
  8473  				var ID string
  8474  				err = json.Unmarshal(*v, &ID)
  8475  				if err != nil {
  8476  					return err
  8477  				}
  8478  				rdagr.ID = &ID
  8479  			}
  8480  		case "name":
  8481  			if v != nil {
  8482  				var name string
  8483  				err = json.Unmarshal(*v, &name)
  8484  				if err != nil {
  8485  					return err
  8486  				}
  8487  				rdagr.Name = &name
  8488  			}
  8489  		case "type":
  8490  			if v != nil {
  8491  				var typeVar string
  8492  				err = json.Unmarshal(*v, &typeVar)
  8493  				if err != nil {
  8494  					return err
  8495  				}
  8496  				rdagr.Type = &typeVar
  8497  			}
  8498  		case "location":
  8499  			if v != nil {
  8500  				var location string
  8501  				err = json.Unmarshal(*v, &location)
  8502  				if err != nil {
  8503  					return err
  8504  				}
  8505  				rdagr.Location = &location
  8506  			}
  8507  		}
  8508  	}
  8509  
  8510  	return nil
  8511  }
  8512  
  8513  // RestorableDatabaseAccountProperties the properties of a restorable database account.
  8514  type RestorableDatabaseAccountProperties struct {
  8515  	// AccountName - The name of the global database account
  8516  	AccountName *string `json:"accountName,omitempty"`
  8517  	// CreationTime - The creation time of the restorable database account (ISO-8601 format).
  8518  	CreationTime *date.Time `json:"creationTime,omitempty"`
  8519  	// DeletionTime - The time at which the restorable database account has been deleted (ISO-8601 format).
  8520  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  8521  	// APIType - READ-ONLY; The API type of the restorable database account. Possible values include: 'MongoDB', 'Gremlin', 'Cassandra', 'Table', 'SQL', 'GremlinV2'
  8522  	APIType APIType `json:"apiType,omitempty"`
  8523  	// RestorableLocations - READ-ONLY; List of regions where the of the database account can be restored from.
  8524  	RestorableLocations *[]RestorableLocationResource `json:"restorableLocations,omitempty"`
  8525  }
  8526  
  8527  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountProperties.
  8528  func (rdap RestorableDatabaseAccountProperties) MarshalJSON() ([]byte, error) {
  8529  	objectMap := make(map[string]interface{})
  8530  	if rdap.AccountName != nil {
  8531  		objectMap["accountName"] = rdap.AccountName
  8532  	}
  8533  	if rdap.CreationTime != nil {
  8534  		objectMap["creationTime"] = rdap.CreationTime
  8535  	}
  8536  	if rdap.DeletionTime != nil {
  8537  		objectMap["deletionTime"] = rdap.DeletionTime
  8538  	}
  8539  	return json.Marshal(objectMap)
  8540  }
  8541  
  8542  // RestorableDatabaseAccountsListResult the List operation response, that contains the restorable database
  8543  // accounts and their properties.
  8544  type RestorableDatabaseAccountsListResult struct {
  8545  	autorest.Response `json:"-"`
  8546  	// Value - READ-ONLY; List of restorable database accounts and their properties.
  8547  	Value *[]RestorableDatabaseAccountGetResult `json:"value,omitempty"`
  8548  }
  8549  
  8550  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountsListResult.
  8551  func (rdalr RestorableDatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  8552  	objectMap := make(map[string]interface{})
  8553  	return json.Marshal(objectMap)
  8554  }
  8555  
  8556  // RestorableLocationResource properties of the regional restorable account.
  8557  type RestorableLocationResource struct {
  8558  	// LocationName - READ-ONLY; The location of the regional restorable account.
  8559  	LocationName *string `json:"locationName,omitempty"`
  8560  	// RegionalDatabaseAccountInstanceID - READ-ONLY; The instance id of the regional restorable account.
  8561  	RegionalDatabaseAccountInstanceID *string `json:"regionalDatabaseAccountInstanceId,omitempty"`
  8562  	// CreationTime - READ-ONLY; The creation time of the regional restorable database account (ISO-8601 format).
  8563  	CreationTime *date.Time `json:"creationTime,omitempty"`
  8564  	// DeletionTime - READ-ONLY; The time at which the regional restorable database account has been deleted (ISO-8601 format).
  8565  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  8566  }
  8567  
  8568  // MarshalJSON is the custom marshaler for RestorableLocationResource.
  8569  func (rlr RestorableLocationResource) MarshalJSON() ([]byte, error) {
  8570  	objectMap := make(map[string]interface{})
  8571  	return json.Marshal(objectMap)
  8572  }
  8573  
  8574  // RestorableMongodbCollectionGetResult an Azure Cosmos DB MongoDB collection event
  8575  type RestorableMongodbCollectionGetResult struct {
  8576  	// RestorableMongodbCollectionProperties - The properties of a MongoDB collection event.
  8577  	*RestorableMongodbCollectionProperties `json:"properties,omitempty"`
  8578  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8579  	ID *string `json:"id,omitempty"`
  8580  	// Name - READ-ONLY; The name of the ARM resource.
  8581  	Name *string `json:"name,omitempty"`
  8582  	// Type - READ-ONLY; The type of Azure resource.
  8583  	Type *string `json:"type,omitempty"`
  8584  }
  8585  
  8586  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionGetResult.
  8587  func (rmcgr RestorableMongodbCollectionGetResult) MarshalJSON() ([]byte, error) {
  8588  	objectMap := make(map[string]interface{})
  8589  	if rmcgr.RestorableMongodbCollectionProperties != nil {
  8590  		objectMap["properties"] = rmcgr.RestorableMongodbCollectionProperties
  8591  	}
  8592  	return json.Marshal(objectMap)
  8593  }
  8594  
  8595  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbCollectionGetResult struct.
  8596  func (rmcgr *RestorableMongodbCollectionGetResult) UnmarshalJSON(body []byte) error {
  8597  	var m map[string]*json.RawMessage
  8598  	err := json.Unmarshal(body, &m)
  8599  	if err != nil {
  8600  		return err
  8601  	}
  8602  	for k, v := range m {
  8603  		switch k {
  8604  		case "properties":
  8605  			if v != nil {
  8606  				var restorableMongodbCollectionProperties RestorableMongodbCollectionProperties
  8607  				err = json.Unmarshal(*v, &restorableMongodbCollectionProperties)
  8608  				if err != nil {
  8609  					return err
  8610  				}
  8611  				rmcgr.RestorableMongodbCollectionProperties = &restorableMongodbCollectionProperties
  8612  			}
  8613  		case "id":
  8614  			if v != nil {
  8615  				var ID string
  8616  				err = json.Unmarshal(*v, &ID)
  8617  				if err != nil {
  8618  					return err
  8619  				}
  8620  				rmcgr.ID = &ID
  8621  			}
  8622  		case "name":
  8623  			if v != nil {
  8624  				var name string
  8625  				err = json.Unmarshal(*v, &name)
  8626  				if err != nil {
  8627  					return err
  8628  				}
  8629  				rmcgr.Name = &name
  8630  			}
  8631  		case "type":
  8632  			if v != nil {
  8633  				var typeVar string
  8634  				err = json.Unmarshal(*v, &typeVar)
  8635  				if err != nil {
  8636  					return err
  8637  				}
  8638  				rmcgr.Type = &typeVar
  8639  			}
  8640  		}
  8641  	}
  8642  
  8643  	return nil
  8644  }
  8645  
  8646  // RestorableMongodbCollectionProperties the properties of an Azure Cosmos DB MongoDB collection event
  8647  type RestorableMongodbCollectionProperties struct {
  8648  	// Resource - The resource of an Azure Cosmos DB MongoDB collection event
  8649  	Resource *RestorableMongodbCollectionPropertiesResource `json:"resource,omitempty"`
  8650  }
  8651  
  8652  // RestorableMongodbCollectionPropertiesResource the resource of an Azure Cosmos DB MongoDB collection
  8653  // event
  8654  type RestorableMongodbCollectionPropertiesResource struct {
  8655  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8656  	Rid *string `json:"_rid,omitempty"`
  8657  	// OperationType - READ-ONLY; The operation type of this collection event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation'
  8658  	OperationType OperationType `json:"operationType,omitempty"`
  8659  	// EventTimestamp - READ-ONLY; The time when this collection event happened.
  8660  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8661  	// OwnerID - READ-ONLY; The name of this MongoDB collection.
  8662  	OwnerID *string `json:"ownerId,omitempty"`
  8663  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB collection.
  8664  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8665  }
  8666  
  8667  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionPropertiesResource.
  8668  func (rmcp RestorableMongodbCollectionPropertiesResource) MarshalJSON() ([]byte, error) {
  8669  	objectMap := make(map[string]interface{})
  8670  	return json.Marshal(objectMap)
  8671  }
  8672  
  8673  // RestorableMongodbCollectionsListResult the List operation response, that contains the MongoDB collection
  8674  // events and their properties.
  8675  type RestorableMongodbCollectionsListResult struct {
  8676  	autorest.Response `json:"-"`
  8677  	// Value - READ-ONLY; List of MongoDB collection events and their properties.
  8678  	Value *[]RestorableMongodbCollectionGetResult `json:"value,omitempty"`
  8679  }
  8680  
  8681  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionsListResult.
  8682  func (rmclr RestorableMongodbCollectionsListResult) MarshalJSON() ([]byte, error) {
  8683  	objectMap := make(map[string]interface{})
  8684  	return json.Marshal(objectMap)
  8685  }
  8686  
  8687  // RestorableMongodbDatabaseGetResult an Azure Cosmos DB MongoDB database event
  8688  type RestorableMongodbDatabaseGetResult struct {
  8689  	// RestorableMongodbDatabaseProperties - The properties of a MongoDB database event.
  8690  	*RestorableMongodbDatabaseProperties `json:"properties,omitempty"`
  8691  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8692  	ID *string `json:"id,omitempty"`
  8693  	// Name - READ-ONLY; The name of the ARM resource.
  8694  	Name *string `json:"name,omitempty"`
  8695  	// Type - READ-ONLY; The type of Azure resource.
  8696  	Type *string `json:"type,omitempty"`
  8697  }
  8698  
  8699  // MarshalJSON is the custom marshaler for RestorableMongodbDatabaseGetResult.
  8700  func (rmdgr RestorableMongodbDatabaseGetResult) MarshalJSON() ([]byte, error) {
  8701  	objectMap := make(map[string]interface{})
  8702  	if rmdgr.RestorableMongodbDatabaseProperties != nil {
  8703  		objectMap["properties"] = rmdgr.RestorableMongodbDatabaseProperties
  8704  	}
  8705  	return json.Marshal(objectMap)
  8706  }
  8707  
  8708  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbDatabaseGetResult struct.
  8709  func (rmdgr *RestorableMongodbDatabaseGetResult) UnmarshalJSON(body []byte) error {
  8710  	var m map[string]*json.RawMessage
  8711  	err := json.Unmarshal(body, &m)
  8712  	if err != nil {
  8713  		return err
  8714  	}
  8715  	for k, v := range m {
  8716  		switch k {
  8717  		case "properties":
  8718  			if v != nil {
  8719  				var restorableMongodbDatabaseProperties RestorableMongodbDatabaseProperties
  8720  				err = json.Unmarshal(*v, &restorableMongodbDatabaseProperties)
  8721  				if err != nil {
  8722  					return err
  8723  				}
  8724  				rmdgr.RestorableMongodbDatabaseProperties = &restorableMongodbDatabaseProperties
  8725  			}
  8726  		case "id":
  8727  			if v != nil {
  8728  				var ID string
  8729  				err = json.Unmarshal(*v, &ID)
  8730  				if err != nil {
  8731  					return err
  8732  				}
  8733  				rmdgr.ID = &ID
  8734  			}
  8735  		case "name":
  8736  			if v != nil {
  8737  				var name string
  8738  				err = json.Unmarshal(*v, &name)
  8739  				if err != nil {
  8740  					return err
  8741  				}
  8742  				rmdgr.Name = &name
  8743  			}
  8744  		case "type":
  8745  			if v != nil {
  8746  				var typeVar string
  8747  				err = json.Unmarshal(*v, &typeVar)
  8748  				if err != nil {
  8749  					return err
  8750  				}
  8751  				rmdgr.Type = &typeVar
  8752  			}
  8753  		}
  8754  	}
  8755  
  8756  	return nil
  8757  }
  8758  
  8759  // RestorableMongodbDatabaseProperties the properties of an Azure Cosmos DB MongoDB database event
  8760  type RestorableMongodbDatabaseProperties struct {
  8761  	// Resource - The resource of an Azure Cosmos DB MongoDB database event
  8762  	Resource *RestorableMongodbDatabasePropertiesResource `json:"resource,omitempty"`
  8763  }
  8764  
  8765  // RestorableMongodbDatabasePropertiesResource the resource of an Azure Cosmos DB MongoDB database event
  8766  type RestorableMongodbDatabasePropertiesResource struct {
  8767  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8768  	Rid *string `json:"_rid,omitempty"`
  8769  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation'
  8770  	OperationType OperationType `json:"operationType,omitempty"`
  8771  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  8772  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8773  	// OwnerID - READ-ONLY; The name of this MongoDB database.
  8774  	OwnerID *string `json:"ownerId,omitempty"`
  8775  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB database.
  8776  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8777  }
  8778  
  8779  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasePropertiesResource.
  8780  func (rmdp RestorableMongodbDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  8781  	objectMap := make(map[string]interface{})
  8782  	return json.Marshal(objectMap)
  8783  }
  8784  
  8785  // RestorableMongodbDatabasesListResult the List operation response, that contains the MongoDB database
  8786  // events and their properties.
  8787  type RestorableMongodbDatabasesListResult struct {
  8788  	autorest.Response `json:"-"`
  8789  	// Value - READ-ONLY; List of MongoDB database events and their properties.
  8790  	Value *[]RestorableMongodbDatabaseGetResult `json:"value,omitempty"`
  8791  }
  8792  
  8793  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasesListResult.
  8794  func (rmdlr RestorableMongodbDatabasesListResult) MarshalJSON() ([]byte, error) {
  8795  	objectMap := make(map[string]interface{})
  8796  	return json.Marshal(objectMap)
  8797  }
  8798  
  8799  // RestorableMongodbResourcesGetResult specific Databases to restore.
  8800  type RestorableMongodbResourcesGetResult struct {
  8801  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8802  	ID *string `json:"id,omitempty"`
  8803  	// Name - READ-ONLY; The name of the ARM resource.
  8804  	Name *string `json:"name,omitempty"`
  8805  	// Type - READ-ONLY; The type of Azure resource.
  8806  	Type *string `json:"type,omitempty"`
  8807  	// DatabaseName - The name of the database available for restore.
  8808  	DatabaseName *string `json:"databaseName,omitempty"`
  8809  	// CollectionNames - The names of the collections available for restore.
  8810  	CollectionNames *[]string `json:"collectionNames,omitempty"`
  8811  }
  8812  
  8813  // MarshalJSON is the custom marshaler for RestorableMongodbResourcesGetResult.
  8814  func (rmrgr RestorableMongodbResourcesGetResult) MarshalJSON() ([]byte, error) {
  8815  	objectMap := make(map[string]interface{})
  8816  	if rmrgr.DatabaseName != nil {
  8817  		objectMap["databaseName"] = rmrgr.DatabaseName
  8818  	}
  8819  	if rmrgr.CollectionNames != nil {
  8820  		objectMap["collectionNames"] = rmrgr.CollectionNames
  8821  	}
  8822  	return json.Marshal(objectMap)
  8823  }
  8824  
  8825  // RestorableMongodbResourcesListResult the List operation response, that contains the restorable MongoDB
  8826  // resources.
  8827  type RestorableMongodbResourcesListResult struct {
  8828  	autorest.Response `json:"-"`
  8829  	// Value - READ-ONLY; List of restorable MongoDB resources, including the database and collection names.
  8830  	Value *[]RestorableMongodbResourcesGetResult `json:"value,omitempty"`
  8831  }
  8832  
  8833  // MarshalJSON is the custom marshaler for RestorableMongodbResourcesListResult.
  8834  func (rmrlr RestorableMongodbResourcesListResult) MarshalJSON() ([]byte, error) {
  8835  	objectMap := make(map[string]interface{})
  8836  	return json.Marshal(objectMap)
  8837  }
  8838  
  8839  // RestorableSQLContainerGetResult an Azure Cosmos DB SQL container event
  8840  type RestorableSQLContainerGetResult struct {
  8841  	// RestorableSQLContainerProperties - The properties of a SQL container event.
  8842  	*RestorableSQLContainerProperties `json:"properties,omitempty"`
  8843  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  8844  	ID *string `json:"id,omitempty"`
  8845  	// Name - READ-ONLY; The name of the ARM resource.
  8846  	Name *string `json:"name,omitempty"`
  8847  	// Type - READ-ONLY; The type of Azure resource.
  8848  	Type *string `json:"type,omitempty"`
  8849  }
  8850  
  8851  // MarshalJSON is the custom marshaler for RestorableSQLContainerGetResult.
  8852  func (rscgr RestorableSQLContainerGetResult) MarshalJSON() ([]byte, error) {
  8853  	objectMap := make(map[string]interface{})
  8854  	if rscgr.RestorableSQLContainerProperties != nil {
  8855  		objectMap["properties"] = rscgr.RestorableSQLContainerProperties
  8856  	}
  8857  	return json.Marshal(objectMap)
  8858  }
  8859  
  8860  // UnmarshalJSON is the custom unmarshaler for RestorableSQLContainerGetResult struct.
  8861  func (rscgr *RestorableSQLContainerGetResult) UnmarshalJSON(body []byte) error {
  8862  	var m map[string]*json.RawMessage
  8863  	err := json.Unmarshal(body, &m)
  8864  	if err != nil {
  8865  		return err
  8866  	}
  8867  	for k, v := range m {
  8868  		switch k {
  8869  		case "properties":
  8870  			if v != nil {
  8871  				var restorableSQLContainerProperties RestorableSQLContainerProperties
  8872  				err = json.Unmarshal(*v, &restorableSQLContainerProperties)
  8873  				if err != nil {
  8874  					return err
  8875  				}
  8876  				rscgr.RestorableSQLContainerProperties = &restorableSQLContainerProperties
  8877  			}
  8878  		case "id":
  8879  			if v != nil {
  8880  				var ID string
  8881  				err = json.Unmarshal(*v, &ID)
  8882  				if err != nil {
  8883  					return err
  8884  				}
  8885  				rscgr.ID = &ID
  8886  			}
  8887  		case "name":
  8888  			if v != nil {
  8889  				var name string
  8890  				err = json.Unmarshal(*v, &name)
  8891  				if err != nil {
  8892  					return err
  8893  				}
  8894  				rscgr.Name = &name
  8895  			}
  8896  		case "type":
  8897  			if v != nil {
  8898  				var typeVar string
  8899  				err = json.Unmarshal(*v, &typeVar)
  8900  				if err != nil {
  8901  					return err
  8902  				}
  8903  				rscgr.Type = &typeVar
  8904  			}
  8905  		}
  8906  	}
  8907  
  8908  	return nil
  8909  }
  8910  
  8911  // RestorableSQLContainerProperties the properties of an Azure Cosmos DB SQL container event
  8912  type RestorableSQLContainerProperties struct {
  8913  	// Resource - The resource of an Azure Cosmos DB SQL container event
  8914  	Resource *RestorableSQLContainerPropertiesResource `json:"resource,omitempty"`
  8915  }
  8916  
  8917  // RestorableSQLContainerPropertiesResource the resource of an Azure Cosmos DB SQL container event
  8918  type RestorableSQLContainerPropertiesResource struct {
  8919  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8920  	Rid *string `json:"_rid,omitempty"`
  8921  	// OperationType - READ-ONLY; The operation type of this container event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation'
  8922  	OperationType OperationType `json:"operationType,omitempty"`
  8923  	// EventTimestamp - READ-ONLY; The when this container event happened.
  8924  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  8925  	// OwnerID - READ-ONLY; The name of this SQL container.
  8926  	OwnerID *string `json:"ownerId,omitempty"`
  8927  	// OwnerResourceID - READ-ONLY; The resource ID of this SQL container.
  8928  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  8929  	// Container - Cosmos DB SQL container resource object
  8930  	Container *RestorableSQLContainerPropertiesResourceContainer `json:"container,omitempty"`
  8931  }
  8932  
  8933  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResource.
  8934  func (rscp RestorableSQLContainerPropertiesResource) MarshalJSON() ([]byte, error) {
  8935  	objectMap := make(map[string]interface{})
  8936  	if rscp.Container != nil {
  8937  		objectMap["container"] = rscp.Container
  8938  	}
  8939  	return json.Marshal(objectMap)
  8940  }
  8941  
  8942  // RestorableSQLContainerPropertiesResourceContainer cosmos DB SQL container resource object
  8943  type RestorableSQLContainerPropertiesResourceContainer struct {
  8944  	// ID - Name of the Cosmos DB SQL container
  8945  	ID *string `json:"id,omitempty"`
  8946  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  8947  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  8948  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  8949  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  8950  	// DefaultTTL - Default time to live
  8951  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  8952  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  8953  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  8954  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  8955  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  8956  	// AnalyticalStorageTTL - Analytical TTL.
  8957  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  8958  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8959  	Rid *string `json:"_rid,omitempty"`
  8960  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  8961  	Ts *float64 `json:"_ts,omitempty"`
  8962  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  8963  	Etag *string `json:"_etag,omitempty"`
  8964  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the container resource.
  8965  	Self *string `json:"_self,omitempty"`
  8966  }
  8967  
  8968  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResourceContainer.
  8969  func (rscp RestorableSQLContainerPropertiesResourceContainer) MarshalJSON() ([]byte, error) {
  8970  	objectMap := make(map[string]interface{})
  8971  	if rscp.ID != nil {
  8972  		objectMap["id"] = rscp.ID
  8973  	}
  8974  	if rscp.IndexingPolicy != nil {
  8975  		objectMap["indexingPolicy"] = rscp.IndexingPolicy
  8976  	}
  8977  	if rscp.PartitionKey != nil {
  8978  		objectMap["partitionKey"] = rscp.PartitionKey
  8979  	}
  8980  	if rscp.DefaultTTL != nil {
  8981  		objectMap["defaultTtl"] = rscp.DefaultTTL
  8982  	}
  8983  	if rscp.UniqueKeyPolicy != nil {
  8984  		objectMap["uniqueKeyPolicy"] = rscp.UniqueKeyPolicy
  8985  	}
  8986  	if rscp.ConflictResolutionPolicy != nil {
  8987  		objectMap["conflictResolutionPolicy"] = rscp.ConflictResolutionPolicy
  8988  	}
  8989  	if rscp.AnalyticalStorageTTL != nil {
  8990  		objectMap["analyticalStorageTtl"] = rscp.AnalyticalStorageTTL
  8991  	}
  8992  	return json.Marshal(objectMap)
  8993  }
  8994  
  8995  // RestorableSQLContainersListResult the List operation response, that contains the SQL container events
  8996  // and their properties.
  8997  type RestorableSQLContainersListResult struct {
  8998  	autorest.Response `json:"-"`
  8999  	// Value - READ-ONLY; List of SQL container events and their properties.
  9000  	Value *[]RestorableSQLContainerGetResult `json:"value,omitempty"`
  9001  }
  9002  
  9003  // MarshalJSON is the custom marshaler for RestorableSQLContainersListResult.
  9004  func (rsclr RestorableSQLContainersListResult) MarshalJSON() ([]byte, error) {
  9005  	objectMap := make(map[string]interface{})
  9006  	return json.Marshal(objectMap)
  9007  }
  9008  
  9009  // RestorableSQLDatabaseGetResult an Azure Cosmos DB SQL database event
  9010  type RestorableSQLDatabaseGetResult struct {
  9011  	// RestorableSQLDatabaseProperties - The properties of a SQL database event.
  9012  	*RestorableSQLDatabaseProperties `json:"properties,omitempty"`
  9013  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  9014  	ID *string `json:"id,omitempty"`
  9015  	// Name - READ-ONLY; The name of the ARM resource.
  9016  	Name *string `json:"name,omitempty"`
  9017  	// Type - READ-ONLY; The type of Azure resource.
  9018  	Type *string `json:"type,omitempty"`
  9019  }
  9020  
  9021  // MarshalJSON is the custom marshaler for RestorableSQLDatabaseGetResult.
  9022  func (rsdgr RestorableSQLDatabaseGetResult) MarshalJSON() ([]byte, error) {
  9023  	objectMap := make(map[string]interface{})
  9024  	if rsdgr.RestorableSQLDatabaseProperties != nil {
  9025  		objectMap["properties"] = rsdgr.RestorableSQLDatabaseProperties
  9026  	}
  9027  	return json.Marshal(objectMap)
  9028  }
  9029  
  9030  // UnmarshalJSON is the custom unmarshaler for RestorableSQLDatabaseGetResult struct.
  9031  func (rsdgr *RestorableSQLDatabaseGetResult) UnmarshalJSON(body []byte) error {
  9032  	var m map[string]*json.RawMessage
  9033  	err := json.Unmarshal(body, &m)
  9034  	if err != nil {
  9035  		return err
  9036  	}
  9037  	for k, v := range m {
  9038  		switch k {
  9039  		case "properties":
  9040  			if v != nil {
  9041  				var restorableSQLDatabaseProperties RestorableSQLDatabaseProperties
  9042  				err = json.Unmarshal(*v, &restorableSQLDatabaseProperties)
  9043  				if err != nil {
  9044  					return err
  9045  				}
  9046  				rsdgr.RestorableSQLDatabaseProperties = &restorableSQLDatabaseProperties
  9047  			}
  9048  		case "id":
  9049  			if v != nil {
  9050  				var ID string
  9051  				err = json.Unmarshal(*v, &ID)
  9052  				if err != nil {
  9053  					return err
  9054  				}
  9055  				rsdgr.ID = &ID
  9056  			}
  9057  		case "name":
  9058  			if v != nil {
  9059  				var name string
  9060  				err = json.Unmarshal(*v, &name)
  9061  				if err != nil {
  9062  					return err
  9063  				}
  9064  				rsdgr.Name = &name
  9065  			}
  9066  		case "type":
  9067  			if v != nil {
  9068  				var typeVar string
  9069  				err = json.Unmarshal(*v, &typeVar)
  9070  				if err != nil {
  9071  					return err
  9072  				}
  9073  				rsdgr.Type = &typeVar
  9074  			}
  9075  		}
  9076  	}
  9077  
  9078  	return nil
  9079  }
  9080  
  9081  // RestorableSQLDatabaseProperties the properties of an Azure Cosmos DB SQL database event
  9082  type RestorableSQLDatabaseProperties struct {
  9083  	// Resource - The resource of an Azure Cosmos DB SQL database event
  9084  	Resource *RestorableSQLDatabasePropertiesResource `json:"resource,omitempty"`
  9085  }
  9086  
  9087  // RestorableSQLDatabasePropertiesResource the resource of an Azure Cosmos DB SQL database event
  9088  type RestorableSQLDatabasePropertiesResource struct {
  9089  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9090  	Rid *string `json:"_rid,omitempty"`
  9091  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation'
  9092  	OperationType OperationType `json:"operationType,omitempty"`
  9093  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  9094  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  9095  	// OwnerID - READ-ONLY; The name of the SQL database.
  9096  	OwnerID *string `json:"ownerId,omitempty"`
  9097  	// OwnerResourceID - READ-ONLY; The resource ID of the SQL database.
  9098  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  9099  	// Database - Cosmos DB SQL database resource object
  9100  	Database *RestorableSQLDatabasePropertiesResourceDatabase `json:"database,omitempty"`
  9101  }
  9102  
  9103  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResource.
  9104  func (rsdp RestorableSQLDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  9105  	objectMap := make(map[string]interface{})
  9106  	if rsdp.Database != nil {
  9107  		objectMap["database"] = rsdp.Database
  9108  	}
  9109  	return json.Marshal(objectMap)
  9110  }
  9111  
  9112  // RestorableSQLDatabasePropertiesResourceDatabase cosmos DB SQL database resource object
  9113  type RestorableSQLDatabasePropertiesResourceDatabase struct {
  9114  	// ID - Name of the Cosmos DB SQL database
  9115  	ID *string `json:"id,omitempty"`
  9116  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9117  	Rid *string `json:"_rid,omitempty"`
  9118  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  9119  	Ts *float64 `json:"_ts,omitempty"`
  9120  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  9121  	Etag *string `json:"_etag,omitempty"`
  9122  	// Colls - READ-ONLY; A system generated property that specified the addressable path of the collections resource.
  9123  	Colls *string `json:"_colls,omitempty"`
  9124  	// Users - READ-ONLY; A system generated property that specifies the addressable path of the users resource.
  9125  	Users *string `json:"_users,omitempty"`
  9126  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the database resource.
  9127  	Self *string `json:"_self,omitempty"`
  9128  }
  9129  
  9130  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResourceDatabase.
  9131  func (rsdp RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON() ([]byte, error) {
  9132  	objectMap := make(map[string]interface{})
  9133  	if rsdp.ID != nil {
  9134  		objectMap["id"] = rsdp.ID
  9135  	}
  9136  	return json.Marshal(objectMap)
  9137  }
  9138  
  9139  // RestorableSQLDatabasesListResult the List operation response, that contains the SQL database events and
  9140  // their properties.
  9141  type RestorableSQLDatabasesListResult struct {
  9142  	autorest.Response `json:"-"`
  9143  	// Value - READ-ONLY; List of SQL database events and their properties.
  9144  	Value *[]RestorableSQLDatabaseGetResult `json:"value,omitempty"`
  9145  }
  9146  
  9147  // MarshalJSON is the custom marshaler for RestorableSQLDatabasesListResult.
  9148  func (rsdlr RestorableSQLDatabasesListResult) MarshalJSON() ([]byte, error) {
  9149  	objectMap := make(map[string]interface{})
  9150  	return json.Marshal(objectMap)
  9151  }
  9152  
  9153  // RestorableSQLResourcesGetResult specific Databases to restore.
  9154  type RestorableSQLResourcesGetResult struct {
  9155  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9156  	ID *string `json:"id,omitempty"`
  9157  	// Name - READ-ONLY; The name of the ARM resource.
  9158  	Name *string `json:"name,omitempty"`
  9159  	// Type - READ-ONLY; The type of Azure resource.
  9160  	Type *string `json:"type,omitempty"`
  9161  	// DatabaseName - The name of the database available for restore.
  9162  	DatabaseName *string `json:"databaseName,omitempty"`
  9163  	// CollectionNames - The names of the collections available for restore.
  9164  	CollectionNames *[]string `json:"collectionNames,omitempty"`
  9165  }
  9166  
  9167  // MarshalJSON is the custom marshaler for RestorableSQLResourcesGetResult.
  9168  func (rsrgr RestorableSQLResourcesGetResult) MarshalJSON() ([]byte, error) {
  9169  	objectMap := make(map[string]interface{})
  9170  	if rsrgr.DatabaseName != nil {
  9171  		objectMap["databaseName"] = rsrgr.DatabaseName
  9172  	}
  9173  	if rsrgr.CollectionNames != nil {
  9174  		objectMap["collectionNames"] = rsrgr.CollectionNames
  9175  	}
  9176  	return json.Marshal(objectMap)
  9177  }
  9178  
  9179  // RestorableSQLResourcesListResult the List operation response, that contains the restorable SQL
  9180  // resources.
  9181  type RestorableSQLResourcesListResult struct {
  9182  	autorest.Response `json:"-"`
  9183  	// Value - READ-ONLY; List of restorable SQL resources, including the database and collection names.
  9184  	Value *[]RestorableSQLResourcesGetResult `json:"value,omitempty"`
  9185  }
  9186  
  9187  // MarshalJSON is the custom marshaler for RestorableSQLResourcesListResult.
  9188  func (rsrlr RestorableSQLResourcesListResult) MarshalJSON() ([]byte, error) {
  9189  	objectMap := make(map[string]interface{})
  9190  	return json.Marshal(objectMap)
  9191  }
  9192  
  9193  // RestoreParameters parameters to indicate the information about the restore.
  9194  type RestoreParameters struct {
  9195  	// RestoreMode - Describes the mode of the restore. Possible values include: 'PointInTime'
  9196  	RestoreMode RestoreMode `json:"restoreMode,omitempty"`
  9197  	// 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}
  9198  	RestoreSource *string `json:"restoreSource,omitempty"`
  9199  	// RestoreTimestampInUtc - Time to which the account has to be restored (ISO-8601 format).
  9200  	RestoreTimestampInUtc *date.Time `json:"restoreTimestampInUtc,omitempty"`
  9201  	// DatabasesToRestore - List of specific databases available for restore.
  9202  	DatabasesToRestore *[]DatabaseRestoreResource `json:"databasesToRestore,omitempty"`
  9203  }
  9204  
  9205  // Role the set of roles permitted through this Role Definition.
  9206  type Role struct {
  9207  	// Db - The database name the role is applied.
  9208  	Db *string `json:"db,omitempty"`
  9209  	// Role - The role name.
  9210  	Role *string `json:"role,omitempty"`
  9211  }
  9212  
  9213  // SeedNode ...
  9214  type SeedNode struct {
  9215  	// IPAddress - IP address of this seed node.
  9216  	IPAddress *string `json:"ipAddress,omitempty"`
  9217  }
  9218  
  9219  // ServiceCreateFuture an abstraction for monitoring and retrieving the results of a long-running
  9220  // operation.
  9221  type ServiceCreateFuture struct {
  9222  	azure.FutureAPI
  9223  	// Result returns the result of the asynchronous operation.
  9224  	// If the operation has not completed it will return an error.
  9225  	Result func(ServiceClient) (ServiceResource, error)
  9226  }
  9227  
  9228  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9229  func (future *ServiceCreateFuture) UnmarshalJSON(body []byte) error {
  9230  	var azFuture azure.Future
  9231  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9232  		return err
  9233  	}
  9234  	future.FutureAPI = &azFuture
  9235  	future.Result = future.result
  9236  	return nil
  9237  }
  9238  
  9239  // result is the default implementation for ServiceCreateFuture.Result.
  9240  func (future *ServiceCreateFuture) result(client ServiceClient) (sr ServiceResource, err error) {
  9241  	var done bool
  9242  	done, err = future.DoneWithContext(context.Background(), client)
  9243  	if err != nil {
  9244  		err = autorest.NewErrorWithError(err, "documentdb.ServiceCreateFuture", "Result", future.Response(), "Polling failure")
  9245  		return
  9246  	}
  9247  	if !done {
  9248  		sr.Response.Response = future.Response()
  9249  		err = azure.NewAsyncOpIncompleteError("documentdb.ServiceCreateFuture")
  9250  		return
  9251  	}
  9252  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9253  	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
  9254  		sr, err = client.CreateResponder(sr.Response.Response)
  9255  		if err != nil {
  9256  			err = autorest.NewErrorWithError(err, "documentdb.ServiceCreateFuture", "Result", sr.Response.Response, "Failure responding to request")
  9257  		}
  9258  	}
  9259  	return
  9260  }
  9261  
  9262  // ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  9263  // operation.
  9264  type ServiceDeleteFuture struct {
  9265  	azure.FutureAPI
  9266  	// Result returns the result of the asynchronous operation.
  9267  	// If the operation has not completed it will return an error.
  9268  	Result func(ServiceClient) (autorest.Response, error)
  9269  }
  9270  
  9271  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9272  func (future *ServiceDeleteFuture) UnmarshalJSON(body []byte) error {
  9273  	var azFuture azure.Future
  9274  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9275  		return err
  9276  	}
  9277  	future.FutureAPI = &azFuture
  9278  	future.Result = future.result
  9279  	return nil
  9280  }
  9281  
  9282  // result is the default implementation for ServiceDeleteFuture.Result.
  9283  func (future *ServiceDeleteFuture) result(client ServiceClient) (ar autorest.Response, err error) {
  9284  	var done bool
  9285  	done, err = future.DoneWithContext(context.Background(), client)
  9286  	if err != nil {
  9287  		err = autorest.NewErrorWithError(err, "documentdb.ServiceDeleteFuture", "Result", future.Response(), "Polling failure")
  9288  		return
  9289  	}
  9290  	if !done {
  9291  		ar.Response = future.Response()
  9292  		err = azure.NewAsyncOpIncompleteError("documentdb.ServiceDeleteFuture")
  9293  		return
  9294  	}
  9295  	ar.Response = future.Response()
  9296  	return
  9297  }
  9298  
  9299  // ServiceResource properties for the database account.
  9300  type ServiceResource struct {
  9301  	autorest.Response `json:"-"`
  9302  	Properties        BasicServiceResourceProperties `json:"properties,omitempty"`
  9303  	// ID - READ-ONLY; The unique resource identifier of the database account.
  9304  	ID *string `json:"id,omitempty"`
  9305  	// Name - READ-ONLY; The name of the database account.
  9306  	Name *string `json:"name,omitempty"`
  9307  	// Type - READ-ONLY; The type of Azure resource.
  9308  	Type *string `json:"type,omitempty"`
  9309  }
  9310  
  9311  // MarshalJSON is the custom marshaler for ServiceResource.
  9312  func (sr ServiceResource) MarshalJSON() ([]byte, error) {
  9313  	objectMap := make(map[string]interface{})
  9314  	objectMap["properties"] = sr.Properties
  9315  	return json.Marshal(objectMap)
  9316  }
  9317  
  9318  // UnmarshalJSON is the custom unmarshaler for ServiceResource struct.
  9319  func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
  9320  	var m map[string]*json.RawMessage
  9321  	err := json.Unmarshal(body, &m)
  9322  	if err != nil {
  9323  		return err
  9324  	}
  9325  	for k, v := range m {
  9326  		switch k {
  9327  		case "properties":
  9328  			if v != nil {
  9329  				properties, err := unmarshalBasicServiceResourceProperties(*v)
  9330  				if err != nil {
  9331  					return err
  9332  				}
  9333  				sr.Properties = properties
  9334  			}
  9335  		case "id":
  9336  			if v != nil {
  9337  				var ID string
  9338  				err = json.Unmarshal(*v, &ID)
  9339  				if err != nil {
  9340  					return err
  9341  				}
  9342  				sr.ID = &ID
  9343  			}
  9344  		case "name":
  9345  			if v != nil {
  9346  				var name string
  9347  				err = json.Unmarshal(*v, &name)
  9348  				if err != nil {
  9349  					return err
  9350  				}
  9351  				sr.Name = &name
  9352  			}
  9353  		case "type":
  9354  			if v != nil {
  9355  				var typeVar string
  9356  				err = json.Unmarshal(*v, &typeVar)
  9357  				if err != nil {
  9358  					return err
  9359  				}
  9360  				sr.Type = &typeVar
  9361  			}
  9362  		}
  9363  	}
  9364  
  9365  	return nil
  9366  }
  9367  
  9368  // ServiceResourceCreateUpdateParameters parameters for Create or Update Request for ServiceResource
  9369  type ServiceResourceCreateUpdateParameters struct {
  9370  	*ServiceResourceCreateUpdateProperties `json:"properties,omitempty"`
  9371  }
  9372  
  9373  // MarshalJSON is the custom marshaler for ServiceResourceCreateUpdateParameters.
  9374  func (srcup ServiceResourceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9375  	objectMap := make(map[string]interface{})
  9376  	if srcup.ServiceResourceCreateUpdateProperties != nil {
  9377  		objectMap["properties"] = srcup.ServiceResourceCreateUpdateProperties
  9378  	}
  9379  	return json.Marshal(objectMap)
  9380  }
  9381  
  9382  // UnmarshalJSON is the custom unmarshaler for ServiceResourceCreateUpdateParameters struct.
  9383  func (srcup *ServiceResourceCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9384  	var m map[string]*json.RawMessage
  9385  	err := json.Unmarshal(body, &m)
  9386  	if err != nil {
  9387  		return err
  9388  	}
  9389  	for k, v := range m {
  9390  		switch k {
  9391  		case "properties":
  9392  			if v != nil {
  9393  				var serviceResourceCreateUpdateProperties ServiceResourceCreateUpdateProperties
  9394  				err = json.Unmarshal(*v, &serviceResourceCreateUpdateProperties)
  9395  				if err != nil {
  9396  					return err
  9397  				}
  9398  				srcup.ServiceResourceCreateUpdateProperties = &serviceResourceCreateUpdateProperties
  9399  			}
  9400  		}
  9401  	}
  9402  
  9403  	return nil
  9404  }
  9405  
  9406  // ServiceResourceCreateUpdateProperties properties in ServiceResourceCreateUpdateParameters.
  9407  type ServiceResourceCreateUpdateProperties struct {
  9408  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
  9409  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  9410  	// InstanceCount - Instance count for the service.
  9411  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  9412  	// ServiceType - Possible values include: 'SQLDedicatedGateway', 'DataTransfer', 'GraphAPICompute', 'MaterializedViewsBuilder'
  9413  	ServiceType ServiceType `json:"serviceType,omitempty"`
  9414  }
  9415  
  9416  // ServiceResourceListResult the List operation response, that contains the Service Resource and their
  9417  // properties.
  9418  type ServiceResourceListResult struct {
  9419  	autorest.Response `json:"-"`
  9420  	// Value - READ-ONLY; List of Service Resource and their properties.
  9421  	Value *[]ServiceResource `json:"value,omitempty"`
  9422  }
  9423  
  9424  // MarshalJSON is the custom marshaler for ServiceResourceListResult.
  9425  func (srlr ServiceResourceListResult) MarshalJSON() ([]byte, error) {
  9426  	objectMap := make(map[string]interface{})
  9427  	return json.Marshal(objectMap)
  9428  }
  9429  
  9430  // BasicServiceResourceProperties services response resource.
  9431  type BasicServiceResourceProperties interface {
  9432  	AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool)
  9433  	AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool)
  9434  	AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool)
  9435  	AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool)
  9436  	AsServiceResourceProperties() (*ServiceResourceProperties, bool)
  9437  }
  9438  
  9439  // ServiceResourceProperties services response resource.
  9440  type ServiceResourceProperties struct {
  9441  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
  9442  	AdditionalProperties map[string]interface{} `json:""`
  9443  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
  9444  	CreationTime *date.Time `json:"creationTime,omitempty"`
  9445  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
  9446  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
  9447  	// InstanceCount - Instance count for the service.
  9448  	InstanceCount *int32 `json:"instanceCount,omitempty"`
  9449  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
  9450  	Status ServiceStatus `json:"status,omitempty"`
  9451  	// ServiceType - Possible values include: 'ServiceTypeServiceResourceProperties', 'ServiceTypeDataTransfer', 'ServiceTypeSQLDedicatedGateway', 'ServiceTypeGraphAPICompute', 'ServiceTypeMaterializedViewsBuilder'
  9452  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
  9453  }
  9454  
  9455  func unmarshalBasicServiceResourceProperties(body []byte) (BasicServiceResourceProperties, error) {
  9456  	var m map[string]interface{}
  9457  	err := json.Unmarshal(body, &m)
  9458  	if err != nil {
  9459  		return nil, err
  9460  	}
  9461  
  9462  	switch m["serviceType"] {
  9463  	case string(ServiceTypeDataTransfer):
  9464  		var dtsrp DataTransferServiceResourceProperties
  9465  		err := json.Unmarshal(body, &dtsrp)
  9466  		return dtsrp, err
  9467  	case string(ServiceTypeSQLDedicatedGateway):
  9468  		var sdgsrp SQLDedicatedGatewayServiceResourceProperties
  9469  		err := json.Unmarshal(body, &sdgsrp)
  9470  		return sdgsrp, err
  9471  	case string(ServiceTypeGraphAPICompute):
  9472  		var gacsrp GraphAPIComputeServiceResourceProperties
  9473  		err := json.Unmarshal(body, &gacsrp)
  9474  		return gacsrp, err
  9475  	case string(ServiceTypeMaterializedViewsBuilder):
  9476  		var mvbsrp MaterializedViewsBuilderServiceResourceProperties
  9477  		err := json.Unmarshal(body, &mvbsrp)
  9478  		return mvbsrp, err
  9479  	default:
  9480  		var srp ServiceResourceProperties
  9481  		err := json.Unmarshal(body, &srp)
  9482  		return srp, err
  9483  	}
  9484  }
  9485  func unmarshalBasicServiceResourcePropertiesArray(body []byte) ([]BasicServiceResourceProperties, error) {
  9486  	var rawMessages []*json.RawMessage
  9487  	err := json.Unmarshal(body, &rawMessages)
  9488  	if err != nil {
  9489  		return nil, err
  9490  	}
  9491  
  9492  	srpArray := make([]BasicServiceResourceProperties, len(rawMessages))
  9493  
  9494  	for index, rawMessage := range rawMessages {
  9495  		srp, err := unmarshalBasicServiceResourceProperties(*rawMessage)
  9496  		if err != nil {
  9497  			return nil, err
  9498  		}
  9499  		srpArray[index] = srp
  9500  	}
  9501  	return srpArray, nil
  9502  }
  9503  
  9504  // MarshalJSON is the custom marshaler for ServiceResourceProperties.
  9505  func (srp ServiceResourceProperties) MarshalJSON() ([]byte, error) {
  9506  	srp.ServiceType = ServiceTypeServiceResourceProperties
  9507  	objectMap := make(map[string]interface{})
  9508  	if srp.InstanceSize != "" {
  9509  		objectMap["instanceSize"] = srp.InstanceSize
  9510  	}
  9511  	if srp.InstanceCount != nil {
  9512  		objectMap["instanceCount"] = srp.InstanceCount
  9513  	}
  9514  	if srp.ServiceType != "" {
  9515  		objectMap["serviceType"] = srp.ServiceType
  9516  	}
  9517  	for k, v := range srp.AdditionalProperties {
  9518  		objectMap[k] = v
  9519  	}
  9520  	return json.Marshal(objectMap)
  9521  }
  9522  
  9523  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9524  func (srp ServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
  9525  	return nil, false
  9526  }
  9527  
  9528  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9529  func (srp ServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
  9530  	return nil, false
  9531  }
  9532  
  9533  // AsGraphAPIComputeServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9534  func (srp ServiceResourceProperties) AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool) {
  9535  	return nil, false
  9536  }
  9537  
  9538  // AsMaterializedViewsBuilderServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9539  func (srp ServiceResourceProperties) AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool) {
  9540  	return nil, false
  9541  }
  9542  
  9543  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9544  func (srp ServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
  9545  	return &srp, true
  9546  }
  9547  
  9548  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
  9549  func (srp ServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
  9550  	return &srp, true
  9551  }
  9552  
  9553  // UnmarshalJSON is the custom unmarshaler for ServiceResourceProperties struct.
  9554  func (srp *ServiceResourceProperties) UnmarshalJSON(body []byte) error {
  9555  	var m map[string]*json.RawMessage
  9556  	err := json.Unmarshal(body, &m)
  9557  	if err != nil {
  9558  		return err
  9559  	}
  9560  	for k, v := range m {
  9561  		switch k {
  9562  		default:
  9563  			if v != nil {
  9564  				var additionalProperties interface{}
  9565  				err = json.Unmarshal(*v, &additionalProperties)
  9566  				if err != nil {
  9567  					return err
  9568  				}
  9569  				if srp.AdditionalProperties == nil {
  9570  					srp.AdditionalProperties = make(map[string]interface{})
  9571  				}
  9572  				srp.AdditionalProperties[k] = additionalProperties
  9573  			}
  9574  		case "creationTime":
  9575  			if v != nil {
  9576  				var creationTime date.Time
  9577  				err = json.Unmarshal(*v, &creationTime)
  9578  				if err != nil {
  9579  					return err
  9580  				}
  9581  				srp.CreationTime = &creationTime
  9582  			}
  9583  		case "instanceSize":
  9584  			if v != nil {
  9585  				var instanceSize ServiceSize
  9586  				err = json.Unmarshal(*v, &instanceSize)
  9587  				if err != nil {
  9588  					return err
  9589  				}
  9590  				srp.InstanceSize = instanceSize
  9591  			}
  9592  		case "instanceCount":
  9593  			if v != nil {
  9594  				var instanceCount int32
  9595  				err = json.Unmarshal(*v, &instanceCount)
  9596  				if err != nil {
  9597  					return err
  9598  				}
  9599  				srp.InstanceCount = &instanceCount
  9600  			}
  9601  		case "status":
  9602  			if v != nil {
  9603  				var status ServiceStatus
  9604  				err = json.Unmarshal(*v, &status)
  9605  				if err != nil {
  9606  					return err
  9607  				}
  9608  				srp.Status = status
  9609  			}
  9610  		case "serviceType":
  9611  			if v != nil {
  9612  				var serviceType ServiceTypeBasicServiceResourceProperties
  9613  				err = json.Unmarshal(*v, &serviceType)
  9614  				if err != nil {
  9615  					return err
  9616  				}
  9617  				srp.ServiceType = serviceType
  9618  			}
  9619  		}
  9620  	}
  9621  
  9622  	return nil
  9623  }
  9624  
  9625  // SpatialSpec ...
  9626  type SpatialSpec struct {
  9627  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  9628  	Path *string `json:"path,omitempty"`
  9629  	// Types - List of path's spatial type
  9630  	Types *[]SpatialType `json:"types,omitempty"`
  9631  }
  9632  
  9633  // SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container.
  9634  type SQLContainerCreateUpdateParameters struct {
  9635  	// SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
  9636  	*SQLContainerCreateUpdateProperties `json:"properties,omitempty"`
  9637  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9638  	ID *string `json:"id,omitempty"`
  9639  	// Name - READ-ONLY; The name of the ARM resource.
  9640  	Name *string `json:"name,omitempty"`
  9641  	// Type - READ-ONLY; The type of Azure resource.
  9642  	Type *string `json:"type,omitempty"`
  9643  	// Location - The location of the resource group to which the resource belongs.
  9644  	Location *string            `json:"location,omitempty"`
  9645  	Tags     map[string]*string `json:"tags"`
  9646  }
  9647  
  9648  // MarshalJSON is the custom marshaler for SQLContainerCreateUpdateParameters.
  9649  func (sccup SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9650  	objectMap := make(map[string]interface{})
  9651  	if sccup.SQLContainerCreateUpdateProperties != nil {
  9652  		objectMap["properties"] = sccup.SQLContainerCreateUpdateProperties
  9653  	}
  9654  	if sccup.Location != nil {
  9655  		objectMap["location"] = sccup.Location
  9656  	}
  9657  	if sccup.Tags != nil {
  9658  		objectMap["tags"] = sccup.Tags
  9659  	}
  9660  	return json.Marshal(objectMap)
  9661  }
  9662  
  9663  // UnmarshalJSON is the custom unmarshaler for SQLContainerCreateUpdateParameters struct.
  9664  func (sccup *SQLContainerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9665  	var m map[string]*json.RawMessage
  9666  	err := json.Unmarshal(body, &m)
  9667  	if err != nil {
  9668  		return err
  9669  	}
  9670  	for k, v := range m {
  9671  		switch k {
  9672  		case "properties":
  9673  			if v != nil {
  9674  				var SQLContainerCreateUpdateProperties SQLContainerCreateUpdateProperties
  9675  				err = json.Unmarshal(*v, &SQLContainerCreateUpdateProperties)
  9676  				if err != nil {
  9677  					return err
  9678  				}
  9679  				sccup.SQLContainerCreateUpdateProperties = &SQLContainerCreateUpdateProperties
  9680  			}
  9681  		case "id":
  9682  			if v != nil {
  9683  				var ID string
  9684  				err = json.Unmarshal(*v, &ID)
  9685  				if err != nil {
  9686  					return err
  9687  				}
  9688  				sccup.ID = &ID
  9689  			}
  9690  		case "name":
  9691  			if v != nil {
  9692  				var name string
  9693  				err = json.Unmarshal(*v, &name)
  9694  				if err != nil {
  9695  					return err
  9696  				}
  9697  				sccup.Name = &name
  9698  			}
  9699  		case "type":
  9700  			if v != nil {
  9701  				var typeVar string
  9702  				err = json.Unmarshal(*v, &typeVar)
  9703  				if err != nil {
  9704  					return err
  9705  				}
  9706  				sccup.Type = &typeVar
  9707  			}
  9708  		case "location":
  9709  			if v != nil {
  9710  				var location string
  9711  				err = json.Unmarshal(*v, &location)
  9712  				if err != nil {
  9713  					return err
  9714  				}
  9715  				sccup.Location = &location
  9716  			}
  9717  		case "tags":
  9718  			if v != nil {
  9719  				var tags map[string]*string
  9720  				err = json.Unmarshal(*v, &tags)
  9721  				if err != nil {
  9722  					return err
  9723  				}
  9724  				sccup.Tags = tags
  9725  			}
  9726  		}
  9727  	}
  9728  
  9729  	return nil
  9730  }
  9731  
  9732  // SQLContainerCreateUpdateProperties properties to create and update Azure Cosmos DB container.
  9733  type SQLContainerCreateUpdateProperties struct {
  9734  	// Resource - The standard JSON format of a container
  9735  	Resource *SQLContainerResource `json:"resource,omitempty"`
  9736  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  9737  	Options *CreateUpdateOptions `json:"options,omitempty"`
  9738  }
  9739  
  9740  // SQLContainerGetProperties the properties of an Azure Cosmos DB container
  9741  type SQLContainerGetProperties struct {
  9742  	Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"`
  9743  	Options  *SQLContainerGetPropertiesOptions  `json:"options,omitempty"`
  9744  }
  9745  
  9746  // SQLContainerGetPropertiesOptions ...
  9747  type SQLContainerGetPropertiesOptions struct {
  9748  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  9749  	Throughput *int32 `json:"throughput,omitempty"`
  9750  	// AutoscaleSettings - Specifies the Autoscale settings.
  9751  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  9752  }
  9753  
  9754  // SQLContainerGetPropertiesResource ...
  9755  type SQLContainerGetPropertiesResource struct {
  9756  	// ID - Name of the Cosmos DB SQL container
  9757  	ID *string `json:"id,omitempty"`
  9758  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  9759  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  9760  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  9761  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  9762  	// DefaultTTL - Default time to live
  9763  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  9764  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  9765  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  9766  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  9767  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  9768  	// AnalyticalStorageTTL - Analytical TTL.
  9769  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  9770  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9771  	Rid *string `json:"_rid,omitempty"`
  9772  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  9773  	Ts *float64 `json:"_ts,omitempty"`
  9774  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  9775  	Etag *string `json:"_etag,omitempty"`
  9776  }
  9777  
  9778  // MarshalJSON is the custom marshaler for SQLContainerGetPropertiesResource.
  9779  func (scgp SQLContainerGetPropertiesResource) MarshalJSON() ([]byte, error) {
  9780  	objectMap := make(map[string]interface{})
  9781  	if scgp.ID != nil {
  9782  		objectMap["id"] = scgp.ID
  9783  	}
  9784  	if scgp.IndexingPolicy != nil {
  9785  		objectMap["indexingPolicy"] = scgp.IndexingPolicy
  9786  	}
  9787  	if scgp.PartitionKey != nil {
  9788  		objectMap["partitionKey"] = scgp.PartitionKey
  9789  	}
  9790  	if scgp.DefaultTTL != nil {
  9791  		objectMap["defaultTtl"] = scgp.DefaultTTL
  9792  	}
  9793  	if scgp.UniqueKeyPolicy != nil {
  9794  		objectMap["uniqueKeyPolicy"] = scgp.UniqueKeyPolicy
  9795  	}
  9796  	if scgp.ConflictResolutionPolicy != nil {
  9797  		objectMap["conflictResolutionPolicy"] = scgp.ConflictResolutionPolicy
  9798  	}
  9799  	if scgp.AnalyticalStorageTTL != nil {
  9800  		objectMap["analyticalStorageTtl"] = scgp.AnalyticalStorageTTL
  9801  	}
  9802  	return json.Marshal(objectMap)
  9803  }
  9804  
  9805  // SQLContainerGetResults an Azure Cosmos DB container.
  9806  type SQLContainerGetResults struct {
  9807  	autorest.Response `json:"-"`
  9808  	// SQLContainerGetProperties - The properties of an Azure Cosmos DB container
  9809  	*SQLContainerGetProperties `json:"properties,omitempty"`
  9810  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9811  	ID *string `json:"id,omitempty"`
  9812  	// Name - READ-ONLY; The name of the ARM resource.
  9813  	Name *string `json:"name,omitempty"`
  9814  	// Type - READ-ONLY; The type of Azure resource.
  9815  	Type *string `json:"type,omitempty"`
  9816  	// Location - The location of the resource group to which the resource belongs.
  9817  	Location *string            `json:"location,omitempty"`
  9818  	Tags     map[string]*string `json:"tags"`
  9819  }
  9820  
  9821  // MarshalJSON is the custom marshaler for SQLContainerGetResults.
  9822  func (scgr SQLContainerGetResults) MarshalJSON() ([]byte, error) {
  9823  	objectMap := make(map[string]interface{})
  9824  	if scgr.SQLContainerGetProperties != nil {
  9825  		objectMap["properties"] = scgr.SQLContainerGetProperties
  9826  	}
  9827  	if scgr.Location != nil {
  9828  		objectMap["location"] = scgr.Location
  9829  	}
  9830  	if scgr.Tags != nil {
  9831  		objectMap["tags"] = scgr.Tags
  9832  	}
  9833  	return json.Marshal(objectMap)
  9834  }
  9835  
  9836  // UnmarshalJSON is the custom unmarshaler for SQLContainerGetResults struct.
  9837  func (scgr *SQLContainerGetResults) UnmarshalJSON(body []byte) error {
  9838  	var m map[string]*json.RawMessage
  9839  	err := json.Unmarshal(body, &m)
  9840  	if err != nil {
  9841  		return err
  9842  	}
  9843  	for k, v := range m {
  9844  		switch k {
  9845  		case "properties":
  9846  			if v != nil {
  9847  				var SQLContainerGetProperties SQLContainerGetProperties
  9848  				err = json.Unmarshal(*v, &SQLContainerGetProperties)
  9849  				if err != nil {
  9850  					return err
  9851  				}
  9852  				scgr.SQLContainerGetProperties = &SQLContainerGetProperties
  9853  			}
  9854  		case "id":
  9855  			if v != nil {
  9856  				var ID string
  9857  				err = json.Unmarshal(*v, &ID)
  9858  				if err != nil {
  9859  					return err
  9860  				}
  9861  				scgr.ID = &ID
  9862  			}
  9863  		case "name":
  9864  			if v != nil {
  9865  				var name string
  9866  				err = json.Unmarshal(*v, &name)
  9867  				if err != nil {
  9868  					return err
  9869  				}
  9870  				scgr.Name = &name
  9871  			}
  9872  		case "type":
  9873  			if v != nil {
  9874  				var typeVar string
  9875  				err = json.Unmarshal(*v, &typeVar)
  9876  				if err != nil {
  9877  					return err
  9878  				}
  9879  				scgr.Type = &typeVar
  9880  			}
  9881  		case "location":
  9882  			if v != nil {
  9883  				var location string
  9884  				err = json.Unmarshal(*v, &location)
  9885  				if err != nil {
  9886  					return err
  9887  				}
  9888  				scgr.Location = &location
  9889  			}
  9890  		case "tags":
  9891  			if v != nil {
  9892  				var tags map[string]*string
  9893  				err = json.Unmarshal(*v, &tags)
  9894  				if err != nil {
  9895  					return err
  9896  				}
  9897  				scgr.Tags = tags
  9898  			}
  9899  		}
  9900  	}
  9901  
  9902  	return nil
  9903  }
  9904  
  9905  // SQLContainerListResult the List operation response, that contains the containers and their properties.
  9906  type SQLContainerListResult struct {
  9907  	autorest.Response `json:"-"`
  9908  	// Value - READ-ONLY; List of containers and their properties.
  9909  	Value *[]SQLContainerGetResults `json:"value,omitempty"`
  9910  }
  9911  
  9912  // MarshalJSON is the custom marshaler for SQLContainerListResult.
  9913  func (sclr SQLContainerListResult) MarshalJSON() ([]byte, error) {
  9914  	objectMap := make(map[string]interface{})
  9915  	return json.Marshal(objectMap)
  9916  }
  9917  
  9918  // SQLContainerResource cosmos DB SQL container resource object
  9919  type SQLContainerResource struct {
  9920  	// ID - Name of the Cosmos DB SQL container
  9921  	ID *string `json:"id,omitempty"`
  9922  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  9923  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  9924  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  9925  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  9926  	// DefaultTTL - Default time to live
  9927  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  9928  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  9929  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  9930  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  9931  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  9932  	// AnalyticalStorageTTL - Analytical TTL.
  9933  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  9934  }
  9935  
  9936  // SQLDatabaseCreateUpdateParameters parameters to create and update Cosmos DB SQL database.
  9937  type SQLDatabaseCreateUpdateParameters struct {
  9938  	// SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
  9939  	*SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  9940  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9941  	ID *string `json:"id,omitempty"`
  9942  	// Name - READ-ONLY; The name of the ARM resource.
  9943  	Name *string `json:"name,omitempty"`
  9944  	// Type - READ-ONLY; The type of Azure resource.
  9945  	Type *string `json:"type,omitempty"`
  9946  	// Location - The location of the resource group to which the resource belongs.
  9947  	Location *string            `json:"location,omitempty"`
  9948  	Tags     map[string]*string `json:"tags"`
  9949  }
  9950  
  9951  // MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateParameters.
  9952  func (sdcup SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9953  	objectMap := make(map[string]interface{})
  9954  	if sdcup.SQLDatabaseCreateUpdateProperties != nil {
  9955  		objectMap["properties"] = sdcup.SQLDatabaseCreateUpdateProperties
  9956  	}
  9957  	if sdcup.Location != nil {
  9958  		objectMap["location"] = sdcup.Location
  9959  	}
  9960  	if sdcup.Tags != nil {
  9961  		objectMap["tags"] = sdcup.Tags
  9962  	}
  9963  	return json.Marshal(objectMap)
  9964  }
  9965  
  9966  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseCreateUpdateParameters struct.
  9967  func (sdcup *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9968  	var m map[string]*json.RawMessage
  9969  	err := json.Unmarshal(body, &m)
  9970  	if err != nil {
  9971  		return err
  9972  	}
  9973  	for k, v := range m {
  9974  		switch k {
  9975  		case "properties":
  9976  			if v != nil {
  9977  				var SQLDatabaseCreateUpdateProperties SQLDatabaseCreateUpdateProperties
  9978  				err = json.Unmarshal(*v, &SQLDatabaseCreateUpdateProperties)
  9979  				if err != nil {
  9980  					return err
  9981  				}
  9982  				sdcup.SQLDatabaseCreateUpdateProperties = &SQLDatabaseCreateUpdateProperties
  9983  			}
  9984  		case "id":
  9985  			if v != nil {
  9986  				var ID string
  9987  				err = json.Unmarshal(*v, &ID)
  9988  				if err != nil {
  9989  					return err
  9990  				}
  9991  				sdcup.ID = &ID
  9992  			}
  9993  		case "name":
  9994  			if v != nil {
  9995  				var name string
  9996  				err = json.Unmarshal(*v, &name)
  9997  				if err != nil {
  9998  					return err
  9999  				}
 10000  				sdcup.Name = &name
 10001  			}
 10002  		case "type":
 10003  			if v != nil {
 10004  				var typeVar string
 10005  				err = json.Unmarshal(*v, &typeVar)
 10006  				if err != nil {
 10007  					return err
 10008  				}
 10009  				sdcup.Type = &typeVar
 10010  			}
 10011  		case "location":
 10012  			if v != nil {
 10013  				var location string
 10014  				err = json.Unmarshal(*v, &location)
 10015  				if err != nil {
 10016  					return err
 10017  				}
 10018  				sdcup.Location = &location
 10019  			}
 10020  		case "tags":
 10021  			if v != nil {
 10022  				var tags map[string]*string
 10023  				err = json.Unmarshal(*v, &tags)
 10024  				if err != nil {
 10025  					return err
 10026  				}
 10027  				sdcup.Tags = tags
 10028  			}
 10029  		}
 10030  	}
 10031  
 10032  	return nil
 10033  }
 10034  
 10035  // SQLDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB SQL database.
 10036  type SQLDatabaseCreateUpdateProperties struct {
 10037  	// Resource - The standard JSON format of a SQL database
 10038  	Resource *SQLDatabaseResource `json:"resource,omitempty"`
 10039  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 10040  	Options *CreateUpdateOptions `json:"options,omitempty"`
 10041  }
 10042  
 10043  // SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
 10044  type SQLDatabaseGetProperties struct {
 10045  	Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"`
 10046  	Options  *SQLDatabaseGetPropertiesOptions  `json:"options,omitempty"`
 10047  }
 10048  
 10049  // SQLDatabaseGetPropertiesOptions ...
 10050  type SQLDatabaseGetPropertiesOptions struct {
 10051  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
 10052  	Throughput *int32 `json:"throughput,omitempty"`
 10053  	// AutoscaleSettings - Specifies the Autoscale settings.
 10054  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
 10055  }
 10056  
 10057  // SQLDatabaseGetPropertiesResource ...
 10058  type SQLDatabaseGetPropertiesResource struct {
 10059  	// ID - Name of the Cosmos DB SQL database
 10060  	ID *string `json:"id,omitempty"`
 10061  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 10062  	Rid *string `json:"_rid,omitempty"`
 10063  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 10064  	Ts *float64 `json:"_ts,omitempty"`
 10065  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 10066  	Etag *string `json:"_etag,omitempty"`
 10067  	// Colls - A system generated property that specified the addressable path of the collections resource.
 10068  	Colls *string `json:"_colls,omitempty"`
 10069  	// Users - A system generated property that specifies the addressable path of the users resource.
 10070  	Users *string `json:"_users,omitempty"`
 10071  }
 10072  
 10073  // MarshalJSON is the custom marshaler for SQLDatabaseGetPropertiesResource.
 10074  func (sdgp SQLDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
 10075  	objectMap := make(map[string]interface{})
 10076  	if sdgp.ID != nil {
 10077  		objectMap["id"] = sdgp.ID
 10078  	}
 10079  	if sdgp.Colls != nil {
 10080  		objectMap["_colls"] = sdgp.Colls
 10081  	}
 10082  	if sdgp.Users != nil {
 10083  		objectMap["_users"] = sdgp.Users
 10084  	}
 10085  	return json.Marshal(objectMap)
 10086  }
 10087  
 10088  // SQLDatabaseGetResults an Azure Cosmos DB SQL database.
 10089  type SQLDatabaseGetResults struct {
 10090  	autorest.Response `json:"-"`
 10091  	// SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
 10092  	*SQLDatabaseGetProperties `json:"properties,omitempty"`
 10093  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10094  	ID *string `json:"id,omitempty"`
 10095  	// Name - READ-ONLY; The name of the ARM resource.
 10096  	Name *string `json:"name,omitempty"`
 10097  	// Type - READ-ONLY; The type of Azure resource.
 10098  	Type *string `json:"type,omitempty"`
 10099  	// Location - The location of the resource group to which the resource belongs.
 10100  	Location *string            `json:"location,omitempty"`
 10101  	Tags     map[string]*string `json:"tags"`
 10102  }
 10103  
 10104  // MarshalJSON is the custom marshaler for SQLDatabaseGetResults.
 10105  func (sdgr SQLDatabaseGetResults) MarshalJSON() ([]byte, error) {
 10106  	objectMap := make(map[string]interface{})
 10107  	if sdgr.SQLDatabaseGetProperties != nil {
 10108  		objectMap["properties"] = sdgr.SQLDatabaseGetProperties
 10109  	}
 10110  	if sdgr.Location != nil {
 10111  		objectMap["location"] = sdgr.Location
 10112  	}
 10113  	if sdgr.Tags != nil {
 10114  		objectMap["tags"] = sdgr.Tags
 10115  	}
 10116  	return json.Marshal(objectMap)
 10117  }
 10118  
 10119  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseGetResults struct.
 10120  func (sdgr *SQLDatabaseGetResults) UnmarshalJSON(body []byte) error {
 10121  	var m map[string]*json.RawMessage
 10122  	err := json.Unmarshal(body, &m)
 10123  	if err != nil {
 10124  		return err
 10125  	}
 10126  	for k, v := range m {
 10127  		switch k {
 10128  		case "properties":
 10129  			if v != nil {
 10130  				var SQLDatabaseGetProperties SQLDatabaseGetProperties
 10131  				err = json.Unmarshal(*v, &SQLDatabaseGetProperties)
 10132  				if err != nil {
 10133  					return err
 10134  				}
 10135  				sdgr.SQLDatabaseGetProperties = &SQLDatabaseGetProperties
 10136  			}
 10137  		case "id":
 10138  			if v != nil {
 10139  				var ID string
 10140  				err = json.Unmarshal(*v, &ID)
 10141  				if err != nil {
 10142  					return err
 10143  				}
 10144  				sdgr.ID = &ID
 10145  			}
 10146  		case "name":
 10147  			if v != nil {
 10148  				var name string
 10149  				err = json.Unmarshal(*v, &name)
 10150  				if err != nil {
 10151  					return err
 10152  				}
 10153  				sdgr.Name = &name
 10154  			}
 10155  		case "type":
 10156  			if v != nil {
 10157  				var typeVar string
 10158  				err = json.Unmarshal(*v, &typeVar)
 10159  				if err != nil {
 10160  					return err
 10161  				}
 10162  				sdgr.Type = &typeVar
 10163  			}
 10164  		case "location":
 10165  			if v != nil {
 10166  				var location string
 10167  				err = json.Unmarshal(*v, &location)
 10168  				if err != nil {
 10169  					return err
 10170  				}
 10171  				sdgr.Location = &location
 10172  			}
 10173  		case "tags":
 10174  			if v != nil {
 10175  				var tags map[string]*string
 10176  				err = json.Unmarshal(*v, &tags)
 10177  				if err != nil {
 10178  					return err
 10179  				}
 10180  				sdgr.Tags = tags
 10181  			}
 10182  		}
 10183  	}
 10184  
 10185  	return nil
 10186  }
 10187  
 10188  // SQLDatabaseListResult the List operation response, that contains the SQL databases and their properties.
 10189  type SQLDatabaseListResult struct {
 10190  	autorest.Response `json:"-"`
 10191  	// Value - READ-ONLY; List of SQL databases and their properties.
 10192  	Value *[]SQLDatabaseGetResults `json:"value,omitempty"`
 10193  }
 10194  
 10195  // MarshalJSON is the custom marshaler for SQLDatabaseListResult.
 10196  func (sdlr SQLDatabaseListResult) MarshalJSON() ([]byte, error) {
 10197  	objectMap := make(map[string]interface{})
 10198  	return json.Marshal(objectMap)
 10199  }
 10200  
 10201  // SQLDatabaseResource cosmos DB SQL database resource object
 10202  type SQLDatabaseResource struct {
 10203  	// ID - Name of the Cosmos DB SQL database
 10204  	ID *string `json:"id,omitempty"`
 10205  }
 10206  
 10207  // SQLDedicatedGatewayRegionalServiceResource resource for a regional service location.
 10208  type SQLDedicatedGatewayRegionalServiceResource struct {
 10209  	// SQLDedicatedGatewayEndpoint - READ-ONLY; The regional endpoint for SqlDedicatedGateway.
 10210  	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"`
 10211  	// Name - READ-ONLY; The regional service name.
 10212  	Name *string `json:"name,omitempty"`
 10213  	// Location - READ-ONLY; The location name.
 10214  	Location *string `json:"location,omitempty"`
 10215  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
 10216  	Status ServiceStatus `json:"status,omitempty"`
 10217  }
 10218  
 10219  // MarshalJSON is the custom marshaler for SQLDedicatedGatewayRegionalServiceResource.
 10220  func (sdgrsr SQLDedicatedGatewayRegionalServiceResource) MarshalJSON() ([]byte, error) {
 10221  	objectMap := make(map[string]interface{})
 10222  	return json.Marshal(objectMap)
 10223  }
 10224  
 10225  // SQLDedicatedGatewayServiceResource describes the service response property for SqlDedicatedGateway.
 10226  type SQLDedicatedGatewayServiceResource struct {
 10227  	Properties *SQLDedicatedGatewayServiceResourceProperties `json:"properties,omitempty"`
 10228  }
 10229  
 10230  // SQLDedicatedGatewayServiceResourceProperties properties for SqlDedicatedGatewayServiceResource.
 10231  type SQLDedicatedGatewayServiceResourceProperties struct {
 10232  	// SQLDedicatedGatewayEndpoint - SqlDedicatedGateway endpoint for the service.
 10233  	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"`
 10234  	// Locations - READ-ONLY; An array that contains all of the locations for the service.
 10235  	Locations *[]SQLDedicatedGatewayRegionalServiceResource `json:"locations,omitempty"`
 10236  	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
 10237  	AdditionalProperties map[string]interface{} `json:""`
 10238  	// CreationTime - READ-ONLY; Time of the last state change (ISO-8601 format).
 10239  	CreationTime *date.Time `json:"creationTime,omitempty"`
 10240  	// InstanceSize - Possible values include: 'CosmosD4s', 'CosmosD8s', 'CosmosD16s'
 10241  	InstanceSize ServiceSize `json:"instanceSize,omitempty"`
 10242  	// InstanceCount - Instance count for the service.
 10243  	InstanceCount *int32 `json:"instanceCount,omitempty"`
 10244  	// Status - READ-ONLY; Possible values include: 'ServiceStatusCreating', 'ServiceStatusRunning', 'ServiceStatusUpdating', 'ServiceStatusDeleting', 'ServiceStatusError', 'ServiceStatusStopped'
 10245  	Status ServiceStatus `json:"status,omitempty"`
 10246  	// ServiceType - Possible values include: 'ServiceTypeServiceResourceProperties', 'ServiceTypeDataTransfer', 'ServiceTypeSQLDedicatedGateway', 'ServiceTypeGraphAPICompute', 'ServiceTypeMaterializedViewsBuilder'
 10247  	ServiceType ServiceTypeBasicServiceResourceProperties `json:"serviceType,omitempty"`
 10248  }
 10249  
 10250  // MarshalJSON is the custom marshaler for SQLDedicatedGatewayServiceResourceProperties.
 10251  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, error) {
 10252  	sdgsrp.ServiceType = ServiceTypeSQLDedicatedGateway
 10253  	objectMap := make(map[string]interface{})
 10254  	if sdgsrp.SQLDedicatedGatewayEndpoint != nil {
 10255  		objectMap["sqlDedicatedGatewayEndpoint"] = sdgsrp.SQLDedicatedGatewayEndpoint
 10256  	}
 10257  	if sdgsrp.InstanceSize != "" {
 10258  		objectMap["instanceSize"] = sdgsrp.InstanceSize
 10259  	}
 10260  	if sdgsrp.InstanceCount != nil {
 10261  		objectMap["instanceCount"] = sdgsrp.InstanceCount
 10262  	}
 10263  	if sdgsrp.ServiceType != "" {
 10264  		objectMap["serviceType"] = sdgsrp.ServiceType
 10265  	}
 10266  	for k, v := range sdgsrp.AdditionalProperties {
 10267  		objectMap[k] = v
 10268  	}
 10269  	return json.Marshal(objectMap)
 10270  }
 10271  
 10272  // AsDataTransferServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10273  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsDataTransferServiceResourceProperties() (*DataTransferServiceResourceProperties, bool) {
 10274  	return nil, false
 10275  }
 10276  
 10277  // AsSQLDedicatedGatewayServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10278  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsSQLDedicatedGatewayServiceResourceProperties() (*SQLDedicatedGatewayServiceResourceProperties, bool) {
 10279  	return &sdgsrp, true
 10280  }
 10281  
 10282  // AsGraphAPIComputeServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10283  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsGraphAPIComputeServiceResourceProperties() (*GraphAPIComputeServiceResourceProperties, bool) {
 10284  	return nil, false
 10285  }
 10286  
 10287  // AsMaterializedViewsBuilderServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10288  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsMaterializedViewsBuilderServiceResourceProperties() (*MaterializedViewsBuilderServiceResourceProperties, bool) {
 10289  	return nil, false
 10290  }
 10291  
 10292  // AsServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10293  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
 10294  	return nil, false
 10295  }
 10296  
 10297  // AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for SQLDedicatedGatewayServiceResourceProperties.
 10298  func (sdgsrp SQLDedicatedGatewayServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
 10299  	return &sdgsrp, true
 10300  }
 10301  
 10302  // UnmarshalJSON is the custom unmarshaler for SQLDedicatedGatewayServiceResourceProperties struct.
 10303  func (sdgsrp *SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON(body []byte) error {
 10304  	var m map[string]*json.RawMessage
 10305  	err := json.Unmarshal(body, &m)
 10306  	if err != nil {
 10307  		return err
 10308  	}
 10309  	for k, v := range m {
 10310  		switch k {
 10311  		case "sqlDedicatedGatewayEndpoint":
 10312  			if v != nil {
 10313  				var SQLDedicatedGatewayEndpoint string
 10314  				err = json.Unmarshal(*v, &SQLDedicatedGatewayEndpoint)
 10315  				if err != nil {
 10316  					return err
 10317  				}
 10318  				sdgsrp.SQLDedicatedGatewayEndpoint = &SQLDedicatedGatewayEndpoint
 10319  			}
 10320  		case "locations":
 10321  			if v != nil {
 10322  				var locations []SQLDedicatedGatewayRegionalServiceResource
 10323  				err = json.Unmarshal(*v, &locations)
 10324  				if err != nil {
 10325  					return err
 10326  				}
 10327  				sdgsrp.Locations = &locations
 10328  			}
 10329  		default:
 10330  			if v != nil {
 10331  				var additionalProperties interface{}
 10332  				err = json.Unmarshal(*v, &additionalProperties)
 10333  				if err != nil {
 10334  					return err
 10335  				}
 10336  				if sdgsrp.AdditionalProperties == nil {
 10337  					sdgsrp.AdditionalProperties = make(map[string]interface{})
 10338  				}
 10339  				sdgsrp.AdditionalProperties[k] = additionalProperties
 10340  			}
 10341  		case "creationTime":
 10342  			if v != nil {
 10343  				var creationTime date.Time
 10344  				err = json.Unmarshal(*v, &creationTime)
 10345  				if err != nil {
 10346  					return err
 10347  				}
 10348  				sdgsrp.CreationTime = &creationTime
 10349  			}
 10350  		case "instanceSize":
 10351  			if v != nil {
 10352  				var instanceSize ServiceSize
 10353  				err = json.Unmarshal(*v, &instanceSize)
 10354  				if err != nil {
 10355  					return err
 10356  				}
 10357  				sdgsrp.InstanceSize = instanceSize
 10358  			}
 10359  		case "instanceCount":
 10360  			if v != nil {
 10361  				var instanceCount int32
 10362  				err = json.Unmarshal(*v, &instanceCount)
 10363  				if err != nil {
 10364  					return err
 10365  				}
 10366  				sdgsrp.InstanceCount = &instanceCount
 10367  			}
 10368  		case "status":
 10369  			if v != nil {
 10370  				var status ServiceStatus
 10371  				err = json.Unmarshal(*v, &status)
 10372  				if err != nil {
 10373  					return err
 10374  				}
 10375  				sdgsrp.Status = status
 10376  			}
 10377  		case "serviceType":
 10378  			if v != nil {
 10379  				var serviceType ServiceTypeBasicServiceResourceProperties
 10380  				err = json.Unmarshal(*v, &serviceType)
 10381  				if err != nil {
 10382  					return err
 10383  				}
 10384  				sdgsrp.ServiceType = serviceType
 10385  			}
 10386  		}
 10387  	}
 10388  
 10389  	return nil
 10390  }
 10391  
 10392  // SQLResourcesCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results of a
 10393  // long-running operation.
 10394  type SQLResourcesCreateUpdateSQLContainerFuture struct {
 10395  	azure.FutureAPI
 10396  	// Result returns the result of the asynchronous operation.
 10397  	// If the operation has not completed it will return an error.
 10398  	Result func(SQLResourcesClient) (SQLContainerGetResults, error)
 10399  }
 10400  
 10401  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10402  func (future *SQLResourcesCreateUpdateSQLContainerFuture) UnmarshalJSON(body []byte) error {
 10403  	var azFuture azure.Future
 10404  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10405  		return err
 10406  	}
 10407  	future.FutureAPI = &azFuture
 10408  	future.Result = future.result
 10409  	return nil
 10410  }
 10411  
 10412  // result is the default implementation for SQLResourcesCreateUpdateSQLContainerFuture.Result.
 10413  func (future *SQLResourcesCreateUpdateSQLContainerFuture) result(client SQLResourcesClient) (scgr SQLContainerGetResults, err error) {
 10414  	var done bool
 10415  	done, err = future.DoneWithContext(context.Background(), client)
 10416  	if err != nil {
 10417  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", future.Response(), "Polling failure")
 10418  		return
 10419  	}
 10420  	if !done {
 10421  		scgr.Response.Response = future.Response()
 10422  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLContainerFuture")
 10423  		return
 10424  	}
 10425  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10426  	if scgr.Response.Response, err = future.GetResult(sender); err == nil && scgr.Response.Response.StatusCode != http.StatusNoContent {
 10427  		scgr, err = client.CreateUpdateSQLContainerResponder(scgr.Response.Response)
 10428  		if err != nil {
 10429  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", scgr.Response.Response, "Failure responding to request")
 10430  		}
 10431  	}
 10432  	return
 10433  }
 10434  
 10435  // SQLResourcesCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
 10436  // long-running operation.
 10437  type SQLResourcesCreateUpdateSQLDatabaseFuture struct {
 10438  	azure.FutureAPI
 10439  	// Result returns the result of the asynchronous operation.
 10440  	// If the operation has not completed it will return an error.
 10441  	Result func(SQLResourcesClient) (SQLDatabaseGetResults, error)
 10442  }
 10443  
 10444  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10445  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
 10446  	var azFuture azure.Future
 10447  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10448  		return err
 10449  	}
 10450  	future.FutureAPI = &azFuture
 10451  	future.Result = future.result
 10452  	return nil
 10453  }
 10454  
 10455  // result is the default implementation for SQLResourcesCreateUpdateSQLDatabaseFuture.Result.
 10456  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) result(client SQLResourcesClient) (sdgr SQLDatabaseGetResults, err error) {
 10457  	var done bool
 10458  	done, err = future.DoneWithContext(context.Background(), client)
 10459  	if err != nil {
 10460  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
 10461  		return
 10462  	}
 10463  	if !done {
 10464  		sdgr.Response.Response = future.Response()
 10465  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture")
 10466  		return
 10467  	}
 10468  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10469  	if sdgr.Response.Response, err = future.GetResult(sender); err == nil && sdgr.Response.Response.StatusCode != http.StatusNoContent {
 10470  		sdgr, err = client.CreateUpdateSQLDatabaseResponder(sdgr.Response.Response)
 10471  		if err != nil {
 10472  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", sdgr.Response.Response, "Failure responding to request")
 10473  		}
 10474  	}
 10475  	return
 10476  }
 10477  
 10478  // SQLResourcesCreateUpdateSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results
 10479  // of a long-running operation.
 10480  type SQLResourcesCreateUpdateSQLRoleAssignmentFuture struct {
 10481  	azure.FutureAPI
 10482  	// Result returns the result of the asynchronous operation.
 10483  	// If the operation has not completed it will return an error.
 10484  	Result func(SQLResourcesClient) (SQLRoleAssignmentGetResults, error)
 10485  }
 10486  
 10487  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10488  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
 10489  	var azFuture azure.Future
 10490  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10491  		return err
 10492  	}
 10493  	future.FutureAPI = &azFuture
 10494  	future.Result = future.result
 10495  	return nil
 10496  }
 10497  
 10498  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleAssignmentFuture.Result.
 10499  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) result(client SQLResourcesClient) (sragr SQLRoleAssignmentGetResults, err error) {
 10500  	var done bool
 10501  	done, err = future.DoneWithContext(context.Background(), client)
 10502  	if err != nil {
 10503  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
 10504  		return
 10505  	}
 10506  	if !done {
 10507  		sragr.Response.Response = future.Response()
 10508  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture")
 10509  		return
 10510  	}
 10511  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10512  	if sragr.Response.Response, err = future.GetResult(sender); err == nil && sragr.Response.Response.StatusCode != http.StatusNoContent {
 10513  		sragr, err = client.CreateUpdateSQLRoleAssignmentResponder(sragr.Response.Response)
 10514  		if err != nil {
 10515  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", sragr.Response.Response, "Failure responding to request")
 10516  		}
 10517  	}
 10518  	return
 10519  }
 10520  
 10521  // SQLResourcesCreateUpdateSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results
 10522  // of a long-running operation.
 10523  type SQLResourcesCreateUpdateSQLRoleDefinitionFuture struct {
 10524  	azure.FutureAPI
 10525  	// Result returns the result of the asynchronous operation.
 10526  	// If the operation has not completed it will return an error.
 10527  	Result func(SQLResourcesClient) (SQLRoleDefinitionGetResults, error)
 10528  }
 10529  
 10530  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10531  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
 10532  	var azFuture azure.Future
 10533  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10534  		return err
 10535  	}
 10536  	future.FutureAPI = &azFuture
 10537  	future.Result = future.result
 10538  	return nil
 10539  }
 10540  
 10541  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleDefinitionFuture.Result.
 10542  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) result(client SQLResourcesClient) (srdgr SQLRoleDefinitionGetResults, err error) {
 10543  	var done bool
 10544  	done, err = future.DoneWithContext(context.Background(), client)
 10545  	if err != nil {
 10546  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
 10547  		return
 10548  	}
 10549  	if !done {
 10550  		srdgr.Response.Response = future.Response()
 10551  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture")
 10552  		return
 10553  	}
 10554  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10555  	if srdgr.Response.Response, err = future.GetResult(sender); err == nil && srdgr.Response.Response.StatusCode != http.StatusNoContent {
 10556  		srdgr, err = client.CreateUpdateSQLRoleDefinitionResponder(srdgr.Response.Response)
 10557  		if err != nil {
 10558  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", srdgr.Response.Response, "Failure responding to request")
 10559  		}
 10560  	}
 10561  	return
 10562  }
 10563  
 10564  // SQLResourcesCreateUpdateSQLStoredProcedureFuture an abstraction for monitoring and retrieving the
 10565  // results of a long-running operation.
 10566  type SQLResourcesCreateUpdateSQLStoredProcedureFuture struct {
 10567  	azure.FutureAPI
 10568  	// Result returns the result of the asynchronous operation.
 10569  	// If the operation has not completed it will return an error.
 10570  	Result func(SQLResourcesClient) (SQLStoredProcedureGetResults, error)
 10571  }
 10572  
 10573  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10574  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
 10575  	var azFuture azure.Future
 10576  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10577  		return err
 10578  	}
 10579  	future.FutureAPI = &azFuture
 10580  	future.Result = future.result
 10581  	return nil
 10582  }
 10583  
 10584  // result is the default implementation for SQLResourcesCreateUpdateSQLStoredProcedureFuture.Result.
 10585  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) result(client SQLResourcesClient) (sspgr SQLStoredProcedureGetResults, err error) {
 10586  	var done bool
 10587  	done, err = future.DoneWithContext(context.Background(), client)
 10588  	if err != nil {
 10589  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
 10590  		return
 10591  	}
 10592  	if !done {
 10593  		sspgr.Response.Response = future.Response()
 10594  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture")
 10595  		return
 10596  	}
 10597  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10598  	if sspgr.Response.Response, err = future.GetResult(sender); err == nil && sspgr.Response.Response.StatusCode != http.StatusNoContent {
 10599  		sspgr, err = client.CreateUpdateSQLStoredProcedureResponder(sspgr.Response.Response)
 10600  		if err != nil {
 10601  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", sspgr.Response.Response, "Failure responding to request")
 10602  		}
 10603  	}
 10604  	return
 10605  }
 10606  
 10607  // SQLResourcesCreateUpdateSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
 10608  // long-running operation.
 10609  type SQLResourcesCreateUpdateSQLTriggerFuture struct {
 10610  	azure.FutureAPI
 10611  	// Result returns the result of the asynchronous operation.
 10612  	// If the operation has not completed it will return an error.
 10613  	Result func(SQLResourcesClient) (SQLTriggerGetResults, error)
 10614  }
 10615  
 10616  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10617  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) UnmarshalJSON(body []byte) error {
 10618  	var azFuture azure.Future
 10619  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10620  		return err
 10621  	}
 10622  	future.FutureAPI = &azFuture
 10623  	future.Result = future.result
 10624  	return nil
 10625  }
 10626  
 10627  // result is the default implementation for SQLResourcesCreateUpdateSQLTriggerFuture.Result.
 10628  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) result(client SQLResourcesClient) (stgr SQLTriggerGetResults, err error) {
 10629  	var done bool
 10630  	done, err = future.DoneWithContext(context.Background(), client)
 10631  	if err != nil {
 10632  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", future.Response(), "Polling failure")
 10633  		return
 10634  	}
 10635  	if !done {
 10636  		stgr.Response.Response = future.Response()
 10637  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLTriggerFuture")
 10638  		return
 10639  	}
 10640  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10641  	if stgr.Response.Response, err = future.GetResult(sender); err == nil && stgr.Response.Response.StatusCode != http.StatusNoContent {
 10642  		stgr, err = client.CreateUpdateSQLTriggerResponder(stgr.Response.Response)
 10643  		if err != nil {
 10644  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", stgr.Response.Response, "Failure responding to request")
 10645  		}
 10646  	}
 10647  	return
 10648  }
 10649  
 10650  // SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the
 10651  // results of a long-running operation.
 10652  type SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture struct {
 10653  	azure.FutureAPI
 10654  	// Result returns the result of the asynchronous operation.
 10655  	// If the operation has not completed it will return an error.
 10656  	Result func(SQLResourcesClient) (SQLUserDefinedFunctionGetResults, error)
 10657  }
 10658  
 10659  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10660  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
 10661  	var azFuture azure.Future
 10662  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10663  		return err
 10664  	}
 10665  	future.FutureAPI = &azFuture
 10666  	future.Result = future.result
 10667  	return nil
 10668  }
 10669  
 10670  // result is the default implementation for SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture.Result.
 10671  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (sudfgr SQLUserDefinedFunctionGetResults, err error) {
 10672  	var done bool
 10673  	done, err = future.DoneWithContext(context.Background(), client)
 10674  	if err != nil {
 10675  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
 10676  		return
 10677  	}
 10678  	if !done {
 10679  		sudfgr.Response.Response = future.Response()
 10680  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture")
 10681  		return
 10682  	}
 10683  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10684  	if sudfgr.Response.Response, err = future.GetResult(sender); err == nil && sudfgr.Response.Response.StatusCode != http.StatusNoContent {
 10685  		sudfgr, err = client.CreateUpdateSQLUserDefinedFunctionResponder(sudfgr.Response.Response)
 10686  		if err != nil {
 10687  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", sudfgr.Response.Response, "Failure responding to request")
 10688  		}
 10689  	}
 10690  	return
 10691  }
 10692  
 10693  // SQLResourcesDeleteSQLContainerFuture an abstraction for monitoring and retrieving the results of a
 10694  // long-running operation.
 10695  type SQLResourcesDeleteSQLContainerFuture struct {
 10696  	azure.FutureAPI
 10697  	// Result returns the result of the asynchronous operation.
 10698  	// If the operation has not completed it will return an error.
 10699  	Result func(SQLResourcesClient) (autorest.Response, error)
 10700  }
 10701  
 10702  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10703  func (future *SQLResourcesDeleteSQLContainerFuture) UnmarshalJSON(body []byte) error {
 10704  	var azFuture azure.Future
 10705  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10706  		return err
 10707  	}
 10708  	future.FutureAPI = &azFuture
 10709  	future.Result = future.result
 10710  	return nil
 10711  }
 10712  
 10713  // result is the default implementation for SQLResourcesDeleteSQLContainerFuture.Result.
 10714  func (future *SQLResourcesDeleteSQLContainerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10715  	var done bool
 10716  	done, err = future.DoneWithContext(context.Background(), client)
 10717  	if err != nil {
 10718  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLContainerFuture", "Result", future.Response(), "Polling failure")
 10719  		return
 10720  	}
 10721  	if !done {
 10722  		ar.Response = future.Response()
 10723  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLContainerFuture")
 10724  		return
 10725  	}
 10726  	ar.Response = future.Response()
 10727  	return
 10728  }
 10729  
 10730  // SQLResourcesDeleteSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
 10731  // long-running operation.
 10732  type SQLResourcesDeleteSQLDatabaseFuture struct {
 10733  	azure.FutureAPI
 10734  	// Result returns the result of the asynchronous operation.
 10735  	// If the operation has not completed it will return an error.
 10736  	Result func(SQLResourcesClient) (autorest.Response, error)
 10737  }
 10738  
 10739  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10740  func (future *SQLResourcesDeleteSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
 10741  	var azFuture azure.Future
 10742  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10743  		return err
 10744  	}
 10745  	future.FutureAPI = &azFuture
 10746  	future.Result = future.result
 10747  	return nil
 10748  }
 10749  
 10750  // result is the default implementation for SQLResourcesDeleteSQLDatabaseFuture.Result.
 10751  func (future *SQLResourcesDeleteSQLDatabaseFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10752  	var done bool
 10753  	done, err = future.DoneWithContext(context.Background(), client)
 10754  	if err != nil {
 10755  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
 10756  		return
 10757  	}
 10758  	if !done {
 10759  		ar.Response = future.Response()
 10760  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLDatabaseFuture")
 10761  		return
 10762  	}
 10763  	ar.Response = future.Response()
 10764  	return
 10765  }
 10766  
 10767  // SQLResourcesDeleteSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results of a
 10768  // long-running operation.
 10769  type SQLResourcesDeleteSQLRoleAssignmentFuture struct {
 10770  	azure.FutureAPI
 10771  	// Result returns the result of the asynchronous operation.
 10772  	// If the operation has not completed it will return an error.
 10773  	Result func(SQLResourcesClient) (autorest.Response, error)
 10774  }
 10775  
 10776  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10777  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
 10778  	var azFuture azure.Future
 10779  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10780  		return err
 10781  	}
 10782  	future.FutureAPI = &azFuture
 10783  	future.Result = future.result
 10784  	return nil
 10785  }
 10786  
 10787  // result is the default implementation for SQLResourcesDeleteSQLRoleAssignmentFuture.Result.
 10788  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10789  	var done bool
 10790  	done, err = future.DoneWithContext(context.Background(), client)
 10791  	if err != nil {
 10792  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
 10793  		return
 10794  	}
 10795  	if !done {
 10796  		ar.Response = future.Response()
 10797  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture")
 10798  		return
 10799  	}
 10800  	ar.Response = future.Response()
 10801  	return
 10802  }
 10803  
 10804  // SQLResourcesDeleteSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results of a
 10805  // long-running operation.
 10806  type SQLResourcesDeleteSQLRoleDefinitionFuture struct {
 10807  	azure.FutureAPI
 10808  	// Result returns the result of the asynchronous operation.
 10809  	// If the operation has not completed it will return an error.
 10810  	Result func(SQLResourcesClient) (autorest.Response, error)
 10811  }
 10812  
 10813  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10814  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
 10815  	var azFuture azure.Future
 10816  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10817  		return err
 10818  	}
 10819  	future.FutureAPI = &azFuture
 10820  	future.Result = future.result
 10821  	return nil
 10822  }
 10823  
 10824  // result is the default implementation for SQLResourcesDeleteSQLRoleDefinitionFuture.Result.
 10825  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10826  	var done bool
 10827  	done, err = future.DoneWithContext(context.Background(), client)
 10828  	if err != nil {
 10829  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
 10830  		return
 10831  	}
 10832  	if !done {
 10833  		ar.Response = future.Response()
 10834  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture")
 10835  		return
 10836  	}
 10837  	ar.Response = future.Response()
 10838  	return
 10839  }
 10840  
 10841  // SQLResourcesDeleteSQLStoredProcedureFuture an abstraction for monitoring and retrieving the results of a
 10842  // long-running operation.
 10843  type SQLResourcesDeleteSQLStoredProcedureFuture struct {
 10844  	azure.FutureAPI
 10845  	// Result returns the result of the asynchronous operation.
 10846  	// If the operation has not completed it will return an error.
 10847  	Result func(SQLResourcesClient) (autorest.Response, error)
 10848  }
 10849  
 10850  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10851  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
 10852  	var azFuture azure.Future
 10853  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10854  		return err
 10855  	}
 10856  	future.FutureAPI = &azFuture
 10857  	future.Result = future.result
 10858  	return nil
 10859  }
 10860  
 10861  // result is the default implementation for SQLResourcesDeleteSQLStoredProcedureFuture.Result.
 10862  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10863  	var done bool
 10864  	done, err = future.DoneWithContext(context.Background(), client)
 10865  	if err != nil {
 10866  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
 10867  		return
 10868  	}
 10869  	if !done {
 10870  		ar.Response = future.Response()
 10871  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLStoredProcedureFuture")
 10872  		return
 10873  	}
 10874  	ar.Response = future.Response()
 10875  	return
 10876  }
 10877  
 10878  // SQLResourcesDeleteSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
 10879  // long-running operation.
 10880  type SQLResourcesDeleteSQLTriggerFuture struct {
 10881  	azure.FutureAPI
 10882  	// Result returns the result of the asynchronous operation.
 10883  	// If the operation has not completed it will return an error.
 10884  	Result func(SQLResourcesClient) (autorest.Response, error)
 10885  }
 10886  
 10887  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10888  func (future *SQLResourcesDeleteSQLTriggerFuture) UnmarshalJSON(body []byte) error {
 10889  	var azFuture azure.Future
 10890  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10891  		return err
 10892  	}
 10893  	future.FutureAPI = &azFuture
 10894  	future.Result = future.result
 10895  	return nil
 10896  }
 10897  
 10898  // result is the default implementation for SQLResourcesDeleteSQLTriggerFuture.Result.
 10899  func (future *SQLResourcesDeleteSQLTriggerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10900  	var done bool
 10901  	done, err = future.DoneWithContext(context.Background(), client)
 10902  	if err != nil {
 10903  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLTriggerFuture", "Result", future.Response(), "Polling failure")
 10904  		return
 10905  	}
 10906  	if !done {
 10907  		ar.Response = future.Response()
 10908  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLTriggerFuture")
 10909  		return
 10910  	}
 10911  	ar.Response = future.Response()
 10912  	return
 10913  }
 10914  
 10915  // SQLResourcesDeleteSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the results
 10916  // of a long-running operation.
 10917  type SQLResourcesDeleteSQLUserDefinedFunctionFuture struct {
 10918  	azure.FutureAPI
 10919  	// Result returns the result of the asynchronous operation.
 10920  	// If the operation has not completed it will return an error.
 10921  	Result func(SQLResourcesClient) (autorest.Response, error)
 10922  }
 10923  
 10924  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10925  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
 10926  	var azFuture azure.Future
 10927  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10928  		return err
 10929  	}
 10930  	future.FutureAPI = &azFuture
 10931  	future.Result = future.result
 10932  	return nil
 10933  }
 10934  
 10935  // result is the default implementation for SQLResourcesDeleteSQLUserDefinedFunctionFuture.Result.
 10936  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
 10937  	var done bool
 10938  	done, err = future.DoneWithContext(context.Background(), client)
 10939  	if err != nil {
 10940  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
 10941  		return
 10942  	}
 10943  	if !done {
 10944  		ar.Response = future.Response()
 10945  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture")
 10946  		return
 10947  	}
 10948  	ar.Response = future.Response()
 10949  	return
 10950  }
 10951  
 10952  // SQLResourcesMigrateSQLContainerToAutoscaleFuture an abstraction for monitoring and retrieving the
 10953  // results of a long-running operation.
 10954  type SQLResourcesMigrateSQLContainerToAutoscaleFuture struct {
 10955  	azure.FutureAPI
 10956  	// Result returns the result of the asynchronous operation.
 10957  	// If the operation has not completed it will return an error.
 10958  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 10959  }
 10960  
 10961  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10962  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 10963  	var azFuture azure.Future
 10964  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10965  		return err
 10966  	}
 10967  	future.FutureAPI = &azFuture
 10968  	future.Result = future.result
 10969  	return nil
 10970  }
 10971  
 10972  // result is the default implementation for SQLResourcesMigrateSQLContainerToAutoscaleFuture.Result.
 10973  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10974  	var done bool
 10975  	done, err = future.DoneWithContext(context.Background(), client)
 10976  	if err != nil {
 10977  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 10978  		return
 10979  	}
 10980  	if !done {
 10981  		tsgr.Response.Response = future.Response()
 10982  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture")
 10983  		return
 10984  	}
 10985  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10986  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10987  		tsgr, err = client.MigrateSQLContainerToAutoscaleResponder(tsgr.Response.Response)
 10988  		if err != nil {
 10989  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10990  		}
 10991  	}
 10992  	return
 10993  }
 10994  
 10995  // SQLResourcesMigrateSQLContainerToManualThroughputFuture an abstraction for monitoring and retrieving the
 10996  // results of a long-running operation.
 10997  type SQLResourcesMigrateSQLContainerToManualThroughputFuture struct {
 10998  	azure.FutureAPI
 10999  	// Result returns the result of the asynchronous operation.
 11000  	// If the operation has not completed it will return an error.
 11001  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 11002  }
 11003  
 11004  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11005  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 11006  	var azFuture azure.Future
 11007  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11008  		return err
 11009  	}
 11010  	future.FutureAPI = &azFuture
 11011  	future.Result = future.result
 11012  	return nil
 11013  }
 11014  
 11015  // result is the default implementation for SQLResourcesMigrateSQLContainerToManualThroughputFuture.Result.
 11016  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11017  	var done bool
 11018  	done, err = future.DoneWithContext(context.Background(), client)
 11019  	if err != nil {
 11020  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 11021  		return
 11022  	}
 11023  	if !done {
 11024  		tsgr.Response.Response = future.Response()
 11025  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture")
 11026  		return
 11027  	}
 11028  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11029  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11030  		tsgr, err = client.MigrateSQLContainerToManualThroughputResponder(tsgr.Response.Response)
 11031  		if err != nil {
 11032  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11033  		}
 11034  	}
 11035  	return
 11036  }
 11037  
 11038  // SQLResourcesMigrateSQLDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the results
 11039  // of a long-running operation.
 11040  type SQLResourcesMigrateSQLDatabaseToAutoscaleFuture struct {
 11041  	azure.FutureAPI
 11042  	// Result returns the result of the asynchronous operation.
 11043  	// If the operation has not completed it will return an error.
 11044  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 11045  }
 11046  
 11047  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11048  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 11049  	var azFuture azure.Future
 11050  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11051  		return err
 11052  	}
 11053  	future.FutureAPI = &azFuture
 11054  	future.Result = future.result
 11055  	return nil
 11056  }
 11057  
 11058  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToAutoscaleFuture.Result.
 11059  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11060  	var done bool
 11061  	done, err = future.DoneWithContext(context.Background(), client)
 11062  	if err != nil {
 11063  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 11064  		return
 11065  	}
 11066  	if !done {
 11067  		tsgr.Response.Response = future.Response()
 11068  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture")
 11069  		return
 11070  	}
 11071  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11072  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11073  		tsgr, err = client.MigrateSQLDatabaseToAutoscaleResponder(tsgr.Response.Response)
 11074  		if err != nil {
 11075  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11076  		}
 11077  	}
 11078  	return
 11079  }
 11080  
 11081  // SQLResourcesMigrateSQLDatabaseToManualThroughputFuture an abstraction for monitoring and retrieving the
 11082  // results of a long-running operation.
 11083  type SQLResourcesMigrateSQLDatabaseToManualThroughputFuture struct {
 11084  	azure.FutureAPI
 11085  	// Result returns the result of the asynchronous operation.
 11086  	// If the operation has not completed it will return an error.
 11087  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 11088  }
 11089  
 11090  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11091  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 11092  	var azFuture azure.Future
 11093  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11094  		return err
 11095  	}
 11096  	future.FutureAPI = &azFuture
 11097  	future.Result = future.result
 11098  	return nil
 11099  }
 11100  
 11101  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToManualThroughputFuture.Result.
 11102  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11103  	var done bool
 11104  	done, err = future.DoneWithContext(context.Background(), client)
 11105  	if err != nil {
 11106  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 11107  		return
 11108  	}
 11109  	if !done {
 11110  		tsgr.Response.Response = future.Response()
 11111  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture")
 11112  		return
 11113  	}
 11114  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11115  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11116  		tsgr, err = client.MigrateSQLDatabaseToManualThroughputResponder(tsgr.Response.Response)
 11117  		if err != nil {
 11118  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11119  		}
 11120  	}
 11121  	return
 11122  }
 11123  
 11124  // SQLResourcesRetrieveContinuousBackupInformationFuture an abstraction for monitoring and retrieving the
 11125  // results of a long-running operation.
 11126  type SQLResourcesRetrieveContinuousBackupInformationFuture struct {
 11127  	azure.FutureAPI
 11128  	// Result returns the result of the asynchronous operation.
 11129  	// If the operation has not completed it will return an error.
 11130  	Result func(SQLResourcesClient) (BackupInformation, error)
 11131  }
 11132  
 11133  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11134  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) UnmarshalJSON(body []byte) error {
 11135  	var azFuture azure.Future
 11136  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11137  		return err
 11138  	}
 11139  	future.FutureAPI = &azFuture
 11140  	future.Result = future.result
 11141  	return nil
 11142  }
 11143  
 11144  // result is the default implementation for SQLResourcesRetrieveContinuousBackupInformationFuture.Result.
 11145  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) result(client SQLResourcesClient) (bi BackupInformation, err error) {
 11146  	var done bool
 11147  	done, err = future.DoneWithContext(context.Background(), client)
 11148  	if err != nil {
 11149  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", future.Response(), "Polling failure")
 11150  		return
 11151  	}
 11152  	if !done {
 11153  		bi.Response.Response = future.Response()
 11154  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture")
 11155  		return
 11156  	}
 11157  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11158  	if bi.Response.Response, err = future.GetResult(sender); err == nil && bi.Response.Response.StatusCode != http.StatusNoContent {
 11159  		bi, err = client.RetrieveContinuousBackupInformationResponder(bi.Response.Response)
 11160  		if err != nil {
 11161  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", bi.Response.Response, "Failure responding to request")
 11162  		}
 11163  	}
 11164  	return
 11165  }
 11166  
 11167  // SQLResourcesUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the results
 11168  // of a long-running operation.
 11169  type SQLResourcesUpdateSQLContainerThroughputFuture struct {
 11170  	azure.FutureAPI
 11171  	// Result returns the result of the asynchronous operation.
 11172  	// If the operation has not completed it will return an error.
 11173  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 11174  }
 11175  
 11176  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11177  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) UnmarshalJSON(body []byte) error {
 11178  	var azFuture azure.Future
 11179  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11180  		return err
 11181  	}
 11182  	future.FutureAPI = &azFuture
 11183  	future.Result = future.result
 11184  	return nil
 11185  }
 11186  
 11187  // result is the default implementation for SQLResourcesUpdateSQLContainerThroughputFuture.Result.
 11188  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11189  	var done bool
 11190  	done, err = future.DoneWithContext(context.Background(), client)
 11191  	if err != nil {
 11192  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", future.Response(), "Polling failure")
 11193  		return
 11194  	}
 11195  	if !done {
 11196  		tsgr.Response.Response = future.Response()
 11197  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLContainerThroughputFuture")
 11198  		return
 11199  	}
 11200  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11201  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11202  		tsgr, err = client.UpdateSQLContainerThroughputResponder(tsgr.Response.Response)
 11203  		if err != nil {
 11204  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11205  		}
 11206  	}
 11207  	return
 11208  }
 11209  
 11210  // SQLResourcesUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the results
 11211  // of a long-running operation.
 11212  type SQLResourcesUpdateSQLDatabaseThroughputFuture struct {
 11213  	azure.FutureAPI
 11214  	// Result returns the result of the asynchronous operation.
 11215  	// If the operation has not completed it will return an error.
 11216  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
 11217  }
 11218  
 11219  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11220  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
 11221  	var azFuture azure.Future
 11222  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11223  		return err
 11224  	}
 11225  	future.FutureAPI = &azFuture
 11226  	future.Result = future.result
 11227  	return nil
 11228  }
 11229  
 11230  // result is the default implementation for SQLResourcesUpdateSQLDatabaseThroughputFuture.Result.
 11231  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11232  	var done bool
 11233  	done, err = future.DoneWithContext(context.Background(), client)
 11234  	if err != nil {
 11235  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
 11236  		return
 11237  	}
 11238  	if !done {
 11239  		tsgr.Response.Response = future.Response()
 11240  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture")
 11241  		return
 11242  	}
 11243  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11244  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11245  		tsgr, err = client.UpdateSQLDatabaseThroughputResponder(tsgr.Response.Response)
 11246  		if err != nil {
 11247  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11248  		}
 11249  	}
 11250  	return
 11251  }
 11252  
 11253  // SQLRoleAssignmentCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
 11254  // Assignment.
 11255  type SQLRoleAssignmentCreateUpdateParameters struct {
 11256  	// SQLRoleAssignmentResource - Properties to create and update an Azure Cosmos DB SQL Role Assignment.
 11257  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
 11258  }
 11259  
 11260  // MarshalJSON is the custom marshaler for SQLRoleAssignmentCreateUpdateParameters.
 11261  func (sracup SQLRoleAssignmentCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11262  	objectMap := make(map[string]interface{})
 11263  	if sracup.SQLRoleAssignmentResource != nil {
 11264  		objectMap["properties"] = sracup.SQLRoleAssignmentResource
 11265  	}
 11266  	return json.Marshal(objectMap)
 11267  }
 11268  
 11269  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentCreateUpdateParameters struct.
 11270  func (sracup *SQLRoleAssignmentCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11271  	var m map[string]*json.RawMessage
 11272  	err := json.Unmarshal(body, &m)
 11273  	if err != nil {
 11274  		return err
 11275  	}
 11276  	for k, v := range m {
 11277  		switch k {
 11278  		case "properties":
 11279  			if v != nil {
 11280  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
 11281  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
 11282  				if err != nil {
 11283  					return err
 11284  				}
 11285  				sracup.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
 11286  			}
 11287  		}
 11288  	}
 11289  
 11290  	return nil
 11291  }
 11292  
 11293  // SQLRoleAssignmentGetResults an Azure Cosmos DB Role Assignment
 11294  type SQLRoleAssignmentGetResults struct {
 11295  	autorest.Response `json:"-"`
 11296  	// SQLRoleAssignmentResource - Properties related to the Role Assignment.
 11297  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
 11298  	// ID - READ-ONLY; The unique resource identifier of the database account.
 11299  	ID *string `json:"id,omitempty"`
 11300  	// Name - READ-ONLY; The name of the database account.
 11301  	Name *string `json:"name,omitempty"`
 11302  	// Type - READ-ONLY; The type of Azure resource.
 11303  	Type *string `json:"type,omitempty"`
 11304  }
 11305  
 11306  // MarshalJSON is the custom marshaler for SQLRoleAssignmentGetResults.
 11307  func (sragr SQLRoleAssignmentGetResults) MarshalJSON() ([]byte, error) {
 11308  	objectMap := make(map[string]interface{})
 11309  	if sragr.SQLRoleAssignmentResource != nil {
 11310  		objectMap["properties"] = sragr.SQLRoleAssignmentResource
 11311  	}
 11312  	return json.Marshal(objectMap)
 11313  }
 11314  
 11315  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentGetResults struct.
 11316  func (sragr *SQLRoleAssignmentGetResults) UnmarshalJSON(body []byte) error {
 11317  	var m map[string]*json.RawMessage
 11318  	err := json.Unmarshal(body, &m)
 11319  	if err != nil {
 11320  		return err
 11321  	}
 11322  	for k, v := range m {
 11323  		switch k {
 11324  		case "properties":
 11325  			if v != nil {
 11326  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
 11327  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
 11328  				if err != nil {
 11329  					return err
 11330  				}
 11331  				sragr.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
 11332  			}
 11333  		case "id":
 11334  			if v != nil {
 11335  				var ID string
 11336  				err = json.Unmarshal(*v, &ID)
 11337  				if err != nil {
 11338  					return err
 11339  				}
 11340  				sragr.ID = &ID
 11341  			}
 11342  		case "name":
 11343  			if v != nil {
 11344  				var name string
 11345  				err = json.Unmarshal(*v, &name)
 11346  				if err != nil {
 11347  					return err
 11348  				}
 11349  				sragr.Name = &name
 11350  			}
 11351  		case "type":
 11352  			if v != nil {
 11353  				var typeVar string
 11354  				err = json.Unmarshal(*v, &typeVar)
 11355  				if err != nil {
 11356  					return err
 11357  				}
 11358  				sragr.Type = &typeVar
 11359  			}
 11360  		}
 11361  	}
 11362  
 11363  	return nil
 11364  }
 11365  
 11366  // SQLRoleAssignmentListResult the relevant Role Assignments.
 11367  type SQLRoleAssignmentListResult struct {
 11368  	autorest.Response `json:"-"`
 11369  	// Value - READ-ONLY; List of Role Assignments and their properties
 11370  	Value *[]SQLRoleAssignmentGetResults `json:"value,omitempty"`
 11371  }
 11372  
 11373  // MarshalJSON is the custom marshaler for SQLRoleAssignmentListResult.
 11374  func (sralr SQLRoleAssignmentListResult) MarshalJSON() ([]byte, error) {
 11375  	objectMap := make(map[string]interface{})
 11376  	return json.Marshal(objectMap)
 11377  }
 11378  
 11379  // SQLRoleAssignmentResource azure Cosmos DB SQL Role Assignment resource object.
 11380  type SQLRoleAssignmentResource struct {
 11381  	// RoleDefinitionID - The unique identifier for the associated Role Definition.
 11382  	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
 11383  	// Scope - The data plane resource path for which access is being granted through this Role Assignment.
 11384  	Scope *string `json:"scope,omitempty"`
 11385  	// 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.
 11386  	PrincipalID *string `json:"principalId,omitempty"`
 11387  }
 11388  
 11389  // SQLRoleDefinitionCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
 11390  // Definition.
 11391  type SQLRoleDefinitionCreateUpdateParameters struct {
 11392  	// SQLRoleDefinitionResource - Properties to create and update an Azure Cosmos DB SQL Role Definition.
 11393  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
 11394  }
 11395  
 11396  // MarshalJSON is the custom marshaler for SQLRoleDefinitionCreateUpdateParameters.
 11397  func (srdcup SQLRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11398  	objectMap := make(map[string]interface{})
 11399  	if srdcup.SQLRoleDefinitionResource != nil {
 11400  		objectMap["properties"] = srdcup.SQLRoleDefinitionResource
 11401  	}
 11402  	return json.Marshal(objectMap)
 11403  }
 11404  
 11405  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionCreateUpdateParameters struct.
 11406  func (srdcup *SQLRoleDefinitionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11407  	var m map[string]*json.RawMessage
 11408  	err := json.Unmarshal(body, &m)
 11409  	if err != nil {
 11410  		return err
 11411  	}
 11412  	for k, v := range m {
 11413  		switch k {
 11414  		case "properties":
 11415  			if v != nil {
 11416  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
 11417  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
 11418  				if err != nil {
 11419  					return err
 11420  				}
 11421  				srdcup.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
 11422  			}
 11423  		}
 11424  	}
 11425  
 11426  	return nil
 11427  }
 11428  
 11429  // SQLRoleDefinitionGetResults an Azure Cosmos DB SQL Role Definition.
 11430  type SQLRoleDefinitionGetResults struct {
 11431  	autorest.Response `json:"-"`
 11432  	// SQLRoleDefinitionResource - Properties related to the Role Definition.
 11433  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
 11434  	// ID - READ-ONLY; The unique resource identifier of the database account.
 11435  	ID *string `json:"id,omitempty"`
 11436  	// Name - READ-ONLY; The name of the database account.
 11437  	Name *string `json:"name,omitempty"`
 11438  	// Type - READ-ONLY; The type of Azure resource.
 11439  	Type *string `json:"type,omitempty"`
 11440  }
 11441  
 11442  // MarshalJSON is the custom marshaler for SQLRoleDefinitionGetResults.
 11443  func (srdgr SQLRoleDefinitionGetResults) MarshalJSON() ([]byte, error) {
 11444  	objectMap := make(map[string]interface{})
 11445  	if srdgr.SQLRoleDefinitionResource != nil {
 11446  		objectMap["properties"] = srdgr.SQLRoleDefinitionResource
 11447  	}
 11448  	return json.Marshal(objectMap)
 11449  }
 11450  
 11451  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionGetResults struct.
 11452  func (srdgr *SQLRoleDefinitionGetResults) UnmarshalJSON(body []byte) error {
 11453  	var m map[string]*json.RawMessage
 11454  	err := json.Unmarshal(body, &m)
 11455  	if err != nil {
 11456  		return err
 11457  	}
 11458  	for k, v := range m {
 11459  		switch k {
 11460  		case "properties":
 11461  			if v != nil {
 11462  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
 11463  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
 11464  				if err != nil {
 11465  					return err
 11466  				}
 11467  				srdgr.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
 11468  			}
 11469  		case "id":
 11470  			if v != nil {
 11471  				var ID string
 11472  				err = json.Unmarshal(*v, &ID)
 11473  				if err != nil {
 11474  					return err
 11475  				}
 11476  				srdgr.ID = &ID
 11477  			}
 11478  		case "name":
 11479  			if v != nil {
 11480  				var name string
 11481  				err = json.Unmarshal(*v, &name)
 11482  				if err != nil {
 11483  					return err
 11484  				}
 11485  				srdgr.Name = &name
 11486  			}
 11487  		case "type":
 11488  			if v != nil {
 11489  				var typeVar string
 11490  				err = json.Unmarshal(*v, &typeVar)
 11491  				if err != nil {
 11492  					return err
 11493  				}
 11494  				srdgr.Type = &typeVar
 11495  			}
 11496  		}
 11497  	}
 11498  
 11499  	return nil
 11500  }
 11501  
 11502  // SQLRoleDefinitionListResult the relevant Role Definitions.
 11503  type SQLRoleDefinitionListResult struct {
 11504  	autorest.Response `json:"-"`
 11505  	// Value - READ-ONLY; List of Role Definitions and their properties.
 11506  	Value *[]SQLRoleDefinitionGetResults `json:"value,omitempty"`
 11507  }
 11508  
 11509  // MarshalJSON is the custom marshaler for SQLRoleDefinitionListResult.
 11510  func (srdlr SQLRoleDefinitionListResult) MarshalJSON() ([]byte, error) {
 11511  	objectMap := make(map[string]interface{})
 11512  	return json.Marshal(objectMap)
 11513  }
 11514  
 11515  // SQLRoleDefinitionResource azure Cosmos DB SQL Role Definition resource object.
 11516  type SQLRoleDefinitionResource struct {
 11517  	// RoleName - A user-friendly name for the Role Definition. Must be unique for the database account.
 11518  	RoleName *string `json:"roleName,omitempty"`
 11519  	// Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'RoleDefinitionTypeBuiltInRole', 'RoleDefinitionTypeCustomRole'
 11520  	Type RoleDefinitionType `json:"type,omitempty"`
 11521  	// 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.
 11522  	AssignableScopes *[]string `json:"assignableScopes,omitempty"`
 11523  	// Permissions - The set of operations allowed through this Role Definition.
 11524  	Permissions *[]Permission `json:"permissions,omitempty"`
 11525  }
 11526  
 11527  // SQLStoredProcedureCreateUpdateParameters parameters to create and update Cosmos DB storedProcedure.
 11528  type SQLStoredProcedureCreateUpdateParameters struct {
 11529  	// SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure.
 11530  	*SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"`
 11531  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11532  	ID *string `json:"id,omitempty"`
 11533  	// Name - READ-ONLY; The name of the ARM resource.
 11534  	Name *string `json:"name,omitempty"`
 11535  	// Type - READ-ONLY; The type of Azure resource.
 11536  	Type *string `json:"type,omitempty"`
 11537  	// Location - The location of the resource group to which the resource belongs.
 11538  	Location *string            `json:"location,omitempty"`
 11539  	Tags     map[string]*string `json:"tags"`
 11540  }
 11541  
 11542  // MarshalJSON is the custom marshaler for SQLStoredProcedureCreateUpdateParameters.
 11543  func (sspcup SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11544  	objectMap := make(map[string]interface{})
 11545  	if sspcup.SQLStoredProcedureCreateUpdateProperties != nil {
 11546  		objectMap["properties"] = sspcup.SQLStoredProcedureCreateUpdateProperties
 11547  	}
 11548  	if sspcup.Location != nil {
 11549  		objectMap["location"] = sspcup.Location
 11550  	}
 11551  	if sspcup.Tags != nil {
 11552  		objectMap["tags"] = sspcup.Tags
 11553  	}
 11554  	return json.Marshal(objectMap)
 11555  }
 11556  
 11557  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureCreateUpdateParameters struct.
 11558  func (sspcup *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11559  	var m map[string]*json.RawMessage
 11560  	err := json.Unmarshal(body, &m)
 11561  	if err != nil {
 11562  		return err
 11563  	}
 11564  	for k, v := range m {
 11565  		switch k {
 11566  		case "properties":
 11567  			if v != nil {
 11568  				var SQLStoredProcedureCreateUpdateProperties SQLStoredProcedureCreateUpdateProperties
 11569  				err = json.Unmarshal(*v, &SQLStoredProcedureCreateUpdateProperties)
 11570  				if err != nil {
 11571  					return err
 11572  				}
 11573  				sspcup.SQLStoredProcedureCreateUpdateProperties = &SQLStoredProcedureCreateUpdateProperties
 11574  			}
 11575  		case "id":
 11576  			if v != nil {
 11577  				var ID string
 11578  				err = json.Unmarshal(*v, &ID)
 11579  				if err != nil {
 11580  					return err
 11581  				}
 11582  				sspcup.ID = &ID
 11583  			}
 11584  		case "name":
 11585  			if v != nil {
 11586  				var name string
 11587  				err = json.Unmarshal(*v, &name)
 11588  				if err != nil {
 11589  					return err
 11590  				}
 11591  				sspcup.Name = &name
 11592  			}
 11593  		case "type":
 11594  			if v != nil {
 11595  				var typeVar string
 11596  				err = json.Unmarshal(*v, &typeVar)
 11597  				if err != nil {
 11598  					return err
 11599  				}
 11600  				sspcup.Type = &typeVar
 11601  			}
 11602  		case "location":
 11603  			if v != nil {
 11604  				var location string
 11605  				err = json.Unmarshal(*v, &location)
 11606  				if err != nil {
 11607  					return err
 11608  				}
 11609  				sspcup.Location = &location
 11610  			}
 11611  		case "tags":
 11612  			if v != nil {
 11613  				var tags map[string]*string
 11614  				err = json.Unmarshal(*v, &tags)
 11615  				if err != nil {
 11616  					return err
 11617  				}
 11618  				sspcup.Tags = tags
 11619  			}
 11620  		}
 11621  	}
 11622  
 11623  	return nil
 11624  }
 11625  
 11626  // SQLStoredProcedureCreateUpdateProperties properties to create and update Azure Cosmos DB
 11627  // storedProcedure.
 11628  type SQLStoredProcedureCreateUpdateProperties struct {
 11629  	// Resource - The standard JSON format of a storedProcedure
 11630  	Resource *SQLStoredProcedureResource `json:"resource,omitempty"`
 11631  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 11632  	Options *CreateUpdateOptions `json:"options,omitempty"`
 11633  }
 11634  
 11635  // SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure
 11636  type SQLStoredProcedureGetProperties struct {
 11637  	Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"`
 11638  }
 11639  
 11640  // SQLStoredProcedureGetPropertiesResource ...
 11641  type SQLStoredProcedureGetPropertiesResource struct {
 11642  	// ID - Name of the Cosmos DB SQL storedProcedure
 11643  	ID *string `json:"id,omitempty"`
 11644  	// Body - Body of the Stored Procedure
 11645  	Body *string `json:"body,omitempty"`
 11646  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11647  	Rid *string `json:"_rid,omitempty"`
 11648  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11649  	Ts *float64 `json:"_ts,omitempty"`
 11650  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11651  	Etag *string `json:"_etag,omitempty"`
 11652  }
 11653  
 11654  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetPropertiesResource.
 11655  func (sspgp SQLStoredProcedureGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11656  	objectMap := make(map[string]interface{})
 11657  	if sspgp.ID != nil {
 11658  		objectMap["id"] = sspgp.ID
 11659  	}
 11660  	if sspgp.Body != nil {
 11661  		objectMap["body"] = sspgp.Body
 11662  	}
 11663  	return json.Marshal(objectMap)
 11664  }
 11665  
 11666  // SQLStoredProcedureGetResults an Azure Cosmos DB storedProcedure.
 11667  type SQLStoredProcedureGetResults struct {
 11668  	autorest.Response `json:"-"`
 11669  	// SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB storedProcedure
 11670  	*SQLStoredProcedureGetProperties `json:"properties,omitempty"`
 11671  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11672  	ID *string `json:"id,omitempty"`
 11673  	// Name - READ-ONLY; The name of the ARM resource.
 11674  	Name *string `json:"name,omitempty"`
 11675  	// Type - READ-ONLY; The type of Azure resource.
 11676  	Type *string `json:"type,omitempty"`
 11677  	// Location - The location of the resource group to which the resource belongs.
 11678  	Location *string            `json:"location,omitempty"`
 11679  	Tags     map[string]*string `json:"tags"`
 11680  }
 11681  
 11682  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetResults.
 11683  func (sspgr SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error) {
 11684  	objectMap := make(map[string]interface{})
 11685  	if sspgr.SQLStoredProcedureGetProperties != nil {
 11686  		objectMap["properties"] = sspgr.SQLStoredProcedureGetProperties
 11687  	}
 11688  	if sspgr.Location != nil {
 11689  		objectMap["location"] = sspgr.Location
 11690  	}
 11691  	if sspgr.Tags != nil {
 11692  		objectMap["tags"] = sspgr.Tags
 11693  	}
 11694  	return json.Marshal(objectMap)
 11695  }
 11696  
 11697  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureGetResults struct.
 11698  func (sspgr *SQLStoredProcedureGetResults) UnmarshalJSON(body []byte) error {
 11699  	var m map[string]*json.RawMessage
 11700  	err := json.Unmarshal(body, &m)
 11701  	if err != nil {
 11702  		return err
 11703  	}
 11704  	for k, v := range m {
 11705  		switch k {
 11706  		case "properties":
 11707  			if v != nil {
 11708  				var SQLStoredProcedureGetProperties SQLStoredProcedureGetProperties
 11709  				err = json.Unmarshal(*v, &SQLStoredProcedureGetProperties)
 11710  				if err != nil {
 11711  					return err
 11712  				}
 11713  				sspgr.SQLStoredProcedureGetProperties = &SQLStoredProcedureGetProperties
 11714  			}
 11715  		case "id":
 11716  			if v != nil {
 11717  				var ID string
 11718  				err = json.Unmarshal(*v, &ID)
 11719  				if err != nil {
 11720  					return err
 11721  				}
 11722  				sspgr.ID = &ID
 11723  			}
 11724  		case "name":
 11725  			if v != nil {
 11726  				var name string
 11727  				err = json.Unmarshal(*v, &name)
 11728  				if err != nil {
 11729  					return err
 11730  				}
 11731  				sspgr.Name = &name
 11732  			}
 11733  		case "type":
 11734  			if v != nil {
 11735  				var typeVar string
 11736  				err = json.Unmarshal(*v, &typeVar)
 11737  				if err != nil {
 11738  					return err
 11739  				}
 11740  				sspgr.Type = &typeVar
 11741  			}
 11742  		case "location":
 11743  			if v != nil {
 11744  				var location string
 11745  				err = json.Unmarshal(*v, &location)
 11746  				if err != nil {
 11747  					return err
 11748  				}
 11749  				sspgr.Location = &location
 11750  			}
 11751  		case "tags":
 11752  			if v != nil {
 11753  				var tags map[string]*string
 11754  				err = json.Unmarshal(*v, &tags)
 11755  				if err != nil {
 11756  					return err
 11757  				}
 11758  				sspgr.Tags = tags
 11759  			}
 11760  		}
 11761  	}
 11762  
 11763  	return nil
 11764  }
 11765  
 11766  // SQLStoredProcedureListResult the List operation response, that contains the storedProcedures and their
 11767  // properties.
 11768  type SQLStoredProcedureListResult struct {
 11769  	autorest.Response `json:"-"`
 11770  	// Value - READ-ONLY; List of storedProcedures and their properties.
 11771  	Value *[]SQLStoredProcedureGetResults `json:"value,omitempty"`
 11772  }
 11773  
 11774  // MarshalJSON is the custom marshaler for SQLStoredProcedureListResult.
 11775  func (ssplr SQLStoredProcedureListResult) MarshalJSON() ([]byte, error) {
 11776  	objectMap := make(map[string]interface{})
 11777  	return json.Marshal(objectMap)
 11778  }
 11779  
 11780  // SQLStoredProcedureResource cosmos DB SQL storedProcedure resource object
 11781  type SQLStoredProcedureResource struct {
 11782  	// ID - Name of the Cosmos DB SQL storedProcedure
 11783  	ID *string `json:"id,omitempty"`
 11784  	// Body - Body of the Stored Procedure
 11785  	Body *string `json:"body,omitempty"`
 11786  }
 11787  
 11788  // SQLTriggerCreateUpdateParameters parameters to create and update Cosmos DB trigger.
 11789  type SQLTriggerCreateUpdateParameters struct {
 11790  	// SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger.
 11791  	*SQLTriggerCreateUpdateProperties `json:"properties,omitempty"`
 11792  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11793  	ID *string `json:"id,omitempty"`
 11794  	// Name - READ-ONLY; The name of the ARM resource.
 11795  	Name *string `json:"name,omitempty"`
 11796  	// Type - READ-ONLY; The type of Azure resource.
 11797  	Type *string `json:"type,omitempty"`
 11798  	// Location - The location of the resource group to which the resource belongs.
 11799  	Location *string            `json:"location,omitempty"`
 11800  	Tags     map[string]*string `json:"tags"`
 11801  }
 11802  
 11803  // MarshalJSON is the custom marshaler for SQLTriggerCreateUpdateParameters.
 11804  func (stcup SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 11805  	objectMap := make(map[string]interface{})
 11806  	if stcup.SQLTriggerCreateUpdateProperties != nil {
 11807  		objectMap["properties"] = stcup.SQLTriggerCreateUpdateProperties
 11808  	}
 11809  	if stcup.Location != nil {
 11810  		objectMap["location"] = stcup.Location
 11811  	}
 11812  	if stcup.Tags != nil {
 11813  		objectMap["tags"] = stcup.Tags
 11814  	}
 11815  	return json.Marshal(objectMap)
 11816  }
 11817  
 11818  // UnmarshalJSON is the custom unmarshaler for SQLTriggerCreateUpdateParameters struct.
 11819  func (stcup *SQLTriggerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 11820  	var m map[string]*json.RawMessage
 11821  	err := json.Unmarshal(body, &m)
 11822  	if err != nil {
 11823  		return err
 11824  	}
 11825  	for k, v := range m {
 11826  		switch k {
 11827  		case "properties":
 11828  			if v != nil {
 11829  				var SQLTriggerCreateUpdateProperties SQLTriggerCreateUpdateProperties
 11830  				err = json.Unmarshal(*v, &SQLTriggerCreateUpdateProperties)
 11831  				if err != nil {
 11832  					return err
 11833  				}
 11834  				stcup.SQLTriggerCreateUpdateProperties = &SQLTriggerCreateUpdateProperties
 11835  			}
 11836  		case "id":
 11837  			if v != nil {
 11838  				var ID string
 11839  				err = json.Unmarshal(*v, &ID)
 11840  				if err != nil {
 11841  					return err
 11842  				}
 11843  				stcup.ID = &ID
 11844  			}
 11845  		case "name":
 11846  			if v != nil {
 11847  				var name string
 11848  				err = json.Unmarshal(*v, &name)
 11849  				if err != nil {
 11850  					return err
 11851  				}
 11852  				stcup.Name = &name
 11853  			}
 11854  		case "type":
 11855  			if v != nil {
 11856  				var typeVar string
 11857  				err = json.Unmarshal(*v, &typeVar)
 11858  				if err != nil {
 11859  					return err
 11860  				}
 11861  				stcup.Type = &typeVar
 11862  			}
 11863  		case "location":
 11864  			if v != nil {
 11865  				var location string
 11866  				err = json.Unmarshal(*v, &location)
 11867  				if err != nil {
 11868  					return err
 11869  				}
 11870  				stcup.Location = &location
 11871  			}
 11872  		case "tags":
 11873  			if v != nil {
 11874  				var tags map[string]*string
 11875  				err = json.Unmarshal(*v, &tags)
 11876  				if err != nil {
 11877  					return err
 11878  				}
 11879  				stcup.Tags = tags
 11880  			}
 11881  		}
 11882  	}
 11883  
 11884  	return nil
 11885  }
 11886  
 11887  // SQLTriggerCreateUpdateProperties properties to create and update Azure Cosmos DB trigger.
 11888  type SQLTriggerCreateUpdateProperties struct {
 11889  	// Resource - The standard JSON format of a trigger
 11890  	Resource *SQLTriggerResource `json:"resource,omitempty"`
 11891  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 11892  	Options *CreateUpdateOptions `json:"options,omitempty"`
 11893  }
 11894  
 11895  // SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger
 11896  type SQLTriggerGetProperties struct {
 11897  	Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"`
 11898  }
 11899  
 11900  // SQLTriggerGetPropertiesResource ...
 11901  type SQLTriggerGetPropertiesResource struct {
 11902  	// ID - Name of the Cosmos DB SQL trigger
 11903  	ID *string `json:"id,omitempty"`
 11904  	// Body - Body of the Trigger
 11905  	Body *string `json:"body,omitempty"`
 11906  	// TriggerType - Type of the Trigger. Possible values include: 'Pre', 'Post'
 11907  	TriggerType TriggerType `json:"triggerType,omitempty"`
 11908  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 11909  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 11910  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11911  	Rid *string `json:"_rid,omitempty"`
 11912  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11913  	Ts *float64 `json:"_ts,omitempty"`
 11914  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11915  	Etag *string `json:"_etag,omitempty"`
 11916  }
 11917  
 11918  // MarshalJSON is the custom marshaler for SQLTriggerGetPropertiesResource.
 11919  func (stgp SQLTriggerGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11920  	objectMap := make(map[string]interface{})
 11921  	if stgp.ID != nil {
 11922  		objectMap["id"] = stgp.ID
 11923  	}
 11924  	if stgp.Body != nil {
 11925  		objectMap["body"] = stgp.Body
 11926  	}
 11927  	if stgp.TriggerType != "" {
 11928  		objectMap["triggerType"] = stgp.TriggerType
 11929  	}
 11930  	if stgp.TriggerOperation != "" {
 11931  		objectMap["triggerOperation"] = stgp.TriggerOperation
 11932  	}
 11933  	return json.Marshal(objectMap)
 11934  }
 11935  
 11936  // SQLTriggerGetResults an Azure Cosmos DB trigger.
 11937  type SQLTriggerGetResults struct {
 11938  	autorest.Response `json:"-"`
 11939  	// SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger
 11940  	*SQLTriggerGetProperties `json:"properties,omitempty"`
 11941  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11942  	ID *string `json:"id,omitempty"`
 11943  	// Name - READ-ONLY; The name of the ARM resource.
 11944  	Name *string `json:"name,omitempty"`
 11945  	// Type - READ-ONLY; The type of Azure resource.
 11946  	Type *string `json:"type,omitempty"`
 11947  	// Location - The location of the resource group to which the resource belongs.
 11948  	Location *string            `json:"location,omitempty"`
 11949  	Tags     map[string]*string `json:"tags"`
 11950  }
 11951  
 11952  // MarshalJSON is the custom marshaler for SQLTriggerGetResults.
 11953  func (stgr SQLTriggerGetResults) MarshalJSON() ([]byte, error) {
 11954  	objectMap := make(map[string]interface{})
 11955  	if stgr.SQLTriggerGetProperties != nil {
 11956  		objectMap["properties"] = stgr.SQLTriggerGetProperties
 11957  	}
 11958  	if stgr.Location != nil {
 11959  		objectMap["location"] = stgr.Location
 11960  	}
 11961  	if stgr.Tags != nil {
 11962  		objectMap["tags"] = stgr.Tags
 11963  	}
 11964  	return json.Marshal(objectMap)
 11965  }
 11966  
 11967  // UnmarshalJSON is the custom unmarshaler for SQLTriggerGetResults struct.
 11968  func (stgr *SQLTriggerGetResults) UnmarshalJSON(body []byte) error {
 11969  	var m map[string]*json.RawMessage
 11970  	err := json.Unmarshal(body, &m)
 11971  	if err != nil {
 11972  		return err
 11973  	}
 11974  	for k, v := range m {
 11975  		switch k {
 11976  		case "properties":
 11977  			if v != nil {
 11978  				var SQLTriggerGetProperties SQLTriggerGetProperties
 11979  				err = json.Unmarshal(*v, &SQLTriggerGetProperties)
 11980  				if err != nil {
 11981  					return err
 11982  				}
 11983  				stgr.SQLTriggerGetProperties = &SQLTriggerGetProperties
 11984  			}
 11985  		case "id":
 11986  			if v != nil {
 11987  				var ID string
 11988  				err = json.Unmarshal(*v, &ID)
 11989  				if err != nil {
 11990  					return err
 11991  				}
 11992  				stgr.ID = &ID
 11993  			}
 11994  		case "name":
 11995  			if v != nil {
 11996  				var name string
 11997  				err = json.Unmarshal(*v, &name)
 11998  				if err != nil {
 11999  					return err
 12000  				}
 12001  				stgr.Name = &name
 12002  			}
 12003  		case "type":
 12004  			if v != nil {
 12005  				var typeVar string
 12006  				err = json.Unmarshal(*v, &typeVar)
 12007  				if err != nil {
 12008  					return err
 12009  				}
 12010  				stgr.Type = &typeVar
 12011  			}
 12012  		case "location":
 12013  			if v != nil {
 12014  				var location string
 12015  				err = json.Unmarshal(*v, &location)
 12016  				if err != nil {
 12017  					return err
 12018  				}
 12019  				stgr.Location = &location
 12020  			}
 12021  		case "tags":
 12022  			if v != nil {
 12023  				var tags map[string]*string
 12024  				err = json.Unmarshal(*v, &tags)
 12025  				if err != nil {
 12026  					return err
 12027  				}
 12028  				stgr.Tags = tags
 12029  			}
 12030  		}
 12031  	}
 12032  
 12033  	return nil
 12034  }
 12035  
 12036  // SQLTriggerListResult the List operation response, that contains the triggers and their properties.
 12037  type SQLTriggerListResult struct {
 12038  	autorest.Response `json:"-"`
 12039  	// Value - READ-ONLY; List of triggers and their properties.
 12040  	Value *[]SQLTriggerGetResults `json:"value,omitempty"`
 12041  }
 12042  
 12043  // MarshalJSON is the custom marshaler for SQLTriggerListResult.
 12044  func (stlr SQLTriggerListResult) MarshalJSON() ([]byte, error) {
 12045  	objectMap := make(map[string]interface{})
 12046  	return json.Marshal(objectMap)
 12047  }
 12048  
 12049  // SQLTriggerResource cosmos DB SQL trigger resource object
 12050  type SQLTriggerResource struct {
 12051  	// ID - Name of the Cosmos DB SQL trigger
 12052  	ID *string `json:"id,omitempty"`
 12053  	// Body - Body of the Trigger
 12054  	Body *string `json:"body,omitempty"`
 12055  	// TriggerType - Type of the Trigger. Possible values include: 'Pre', 'Post'
 12056  	TriggerType TriggerType `json:"triggerType,omitempty"`
 12057  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 12058  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 12059  }
 12060  
 12061  // SQLUserDefinedFunctionCreateUpdateParameters parameters to create and update Cosmos DB
 12062  // userDefinedFunction.
 12063  type SQLUserDefinedFunctionCreateUpdateParameters struct {
 12064  	// SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction.
 12065  	*SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"`
 12066  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12067  	ID *string `json:"id,omitempty"`
 12068  	// Name - READ-ONLY; The name of the ARM resource.
 12069  	Name *string `json:"name,omitempty"`
 12070  	// Type - READ-ONLY; The type of Azure resource.
 12071  	Type *string `json:"type,omitempty"`
 12072  	// Location - The location of the resource group to which the resource belongs.
 12073  	Location *string            `json:"location,omitempty"`
 12074  	Tags     map[string]*string `json:"tags"`
 12075  }
 12076  
 12077  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionCreateUpdateParameters.
 12078  func (sudfcup SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 12079  	objectMap := make(map[string]interface{})
 12080  	if sudfcup.SQLUserDefinedFunctionCreateUpdateProperties != nil {
 12081  		objectMap["properties"] = sudfcup.SQLUserDefinedFunctionCreateUpdateProperties
 12082  	}
 12083  	if sudfcup.Location != nil {
 12084  		objectMap["location"] = sudfcup.Location
 12085  	}
 12086  	if sudfcup.Tags != nil {
 12087  		objectMap["tags"] = sudfcup.Tags
 12088  	}
 12089  	return json.Marshal(objectMap)
 12090  }
 12091  
 12092  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionCreateUpdateParameters struct.
 12093  func (sudfcup *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 12094  	var m map[string]*json.RawMessage
 12095  	err := json.Unmarshal(body, &m)
 12096  	if err != nil {
 12097  		return err
 12098  	}
 12099  	for k, v := range m {
 12100  		switch k {
 12101  		case "properties":
 12102  			if v != nil {
 12103  				var SQLUserDefinedFunctionCreateUpdateProperties SQLUserDefinedFunctionCreateUpdateProperties
 12104  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionCreateUpdateProperties)
 12105  				if err != nil {
 12106  					return err
 12107  				}
 12108  				sudfcup.SQLUserDefinedFunctionCreateUpdateProperties = &SQLUserDefinedFunctionCreateUpdateProperties
 12109  			}
 12110  		case "id":
 12111  			if v != nil {
 12112  				var ID string
 12113  				err = json.Unmarshal(*v, &ID)
 12114  				if err != nil {
 12115  					return err
 12116  				}
 12117  				sudfcup.ID = &ID
 12118  			}
 12119  		case "name":
 12120  			if v != nil {
 12121  				var name string
 12122  				err = json.Unmarshal(*v, &name)
 12123  				if err != nil {
 12124  					return err
 12125  				}
 12126  				sudfcup.Name = &name
 12127  			}
 12128  		case "type":
 12129  			if v != nil {
 12130  				var typeVar string
 12131  				err = json.Unmarshal(*v, &typeVar)
 12132  				if err != nil {
 12133  					return err
 12134  				}
 12135  				sudfcup.Type = &typeVar
 12136  			}
 12137  		case "location":
 12138  			if v != nil {
 12139  				var location string
 12140  				err = json.Unmarshal(*v, &location)
 12141  				if err != nil {
 12142  					return err
 12143  				}
 12144  				sudfcup.Location = &location
 12145  			}
 12146  		case "tags":
 12147  			if v != nil {
 12148  				var tags map[string]*string
 12149  				err = json.Unmarshal(*v, &tags)
 12150  				if err != nil {
 12151  					return err
 12152  				}
 12153  				sudfcup.Tags = tags
 12154  			}
 12155  		}
 12156  	}
 12157  
 12158  	return nil
 12159  }
 12160  
 12161  // SQLUserDefinedFunctionCreateUpdateProperties properties to create and update Azure Cosmos DB
 12162  // userDefinedFunction.
 12163  type SQLUserDefinedFunctionCreateUpdateProperties struct {
 12164  	// Resource - The standard JSON format of a userDefinedFunction
 12165  	Resource *SQLUserDefinedFunctionResource `json:"resource,omitempty"`
 12166  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 12167  	Options *CreateUpdateOptions `json:"options,omitempty"`
 12168  }
 12169  
 12170  // SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction
 12171  type SQLUserDefinedFunctionGetProperties struct {
 12172  	Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"`
 12173  }
 12174  
 12175  // SQLUserDefinedFunctionGetPropertiesResource ...
 12176  type SQLUserDefinedFunctionGetPropertiesResource struct {
 12177  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 12178  	ID *string `json:"id,omitempty"`
 12179  	// Body - Body of the User Defined Function
 12180  	Body *string `json:"body,omitempty"`
 12181  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 12182  	Rid *string `json:"_rid,omitempty"`
 12183  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 12184  	Ts *float64 `json:"_ts,omitempty"`
 12185  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 12186  	Etag *string `json:"_etag,omitempty"`
 12187  }
 12188  
 12189  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetPropertiesResource.
 12190  func (sudfgp SQLUserDefinedFunctionGetPropertiesResource) MarshalJSON() ([]byte, error) {
 12191  	objectMap := make(map[string]interface{})
 12192  	if sudfgp.ID != nil {
 12193  		objectMap["id"] = sudfgp.ID
 12194  	}
 12195  	if sudfgp.Body != nil {
 12196  		objectMap["body"] = sudfgp.Body
 12197  	}
 12198  	return json.Marshal(objectMap)
 12199  }
 12200  
 12201  // SQLUserDefinedFunctionGetResults an Azure Cosmos DB userDefinedFunction.
 12202  type SQLUserDefinedFunctionGetResults struct {
 12203  	autorest.Response `json:"-"`
 12204  	// SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction
 12205  	*SQLUserDefinedFunctionGetProperties `json:"properties,omitempty"`
 12206  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12207  	ID *string `json:"id,omitempty"`
 12208  	// Name - READ-ONLY; The name of the ARM resource.
 12209  	Name *string `json:"name,omitempty"`
 12210  	// Type - READ-ONLY; The type of Azure resource.
 12211  	Type *string `json:"type,omitempty"`
 12212  	// Location - The location of the resource group to which the resource belongs.
 12213  	Location *string            `json:"location,omitempty"`
 12214  	Tags     map[string]*string `json:"tags"`
 12215  }
 12216  
 12217  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetResults.
 12218  func (sudfgr SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error) {
 12219  	objectMap := make(map[string]interface{})
 12220  	if sudfgr.SQLUserDefinedFunctionGetProperties != nil {
 12221  		objectMap["properties"] = sudfgr.SQLUserDefinedFunctionGetProperties
 12222  	}
 12223  	if sudfgr.Location != nil {
 12224  		objectMap["location"] = sudfgr.Location
 12225  	}
 12226  	if sudfgr.Tags != nil {
 12227  		objectMap["tags"] = sudfgr.Tags
 12228  	}
 12229  	return json.Marshal(objectMap)
 12230  }
 12231  
 12232  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionGetResults struct.
 12233  func (sudfgr *SQLUserDefinedFunctionGetResults) UnmarshalJSON(body []byte) error {
 12234  	var m map[string]*json.RawMessage
 12235  	err := json.Unmarshal(body, &m)
 12236  	if err != nil {
 12237  		return err
 12238  	}
 12239  	for k, v := range m {
 12240  		switch k {
 12241  		case "properties":
 12242  			if v != nil {
 12243  				var SQLUserDefinedFunctionGetProperties SQLUserDefinedFunctionGetProperties
 12244  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionGetProperties)
 12245  				if err != nil {
 12246  					return err
 12247  				}
 12248  				sudfgr.SQLUserDefinedFunctionGetProperties = &SQLUserDefinedFunctionGetProperties
 12249  			}
 12250  		case "id":
 12251  			if v != nil {
 12252  				var ID string
 12253  				err = json.Unmarshal(*v, &ID)
 12254  				if err != nil {
 12255  					return err
 12256  				}
 12257  				sudfgr.ID = &ID
 12258  			}
 12259  		case "name":
 12260  			if v != nil {
 12261  				var name string
 12262  				err = json.Unmarshal(*v, &name)
 12263  				if err != nil {
 12264  					return err
 12265  				}
 12266  				sudfgr.Name = &name
 12267  			}
 12268  		case "type":
 12269  			if v != nil {
 12270  				var typeVar string
 12271  				err = json.Unmarshal(*v, &typeVar)
 12272  				if err != nil {
 12273  					return err
 12274  				}
 12275  				sudfgr.Type = &typeVar
 12276  			}
 12277  		case "location":
 12278  			if v != nil {
 12279  				var location string
 12280  				err = json.Unmarshal(*v, &location)
 12281  				if err != nil {
 12282  					return err
 12283  				}
 12284  				sudfgr.Location = &location
 12285  			}
 12286  		case "tags":
 12287  			if v != nil {
 12288  				var tags map[string]*string
 12289  				err = json.Unmarshal(*v, &tags)
 12290  				if err != nil {
 12291  					return err
 12292  				}
 12293  				sudfgr.Tags = tags
 12294  			}
 12295  		}
 12296  	}
 12297  
 12298  	return nil
 12299  }
 12300  
 12301  // SQLUserDefinedFunctionListResult the List operation response, that contains the userDefinedFunctions and
 12302  // their properties.
 12303  type SQLUserDefinedFunctionListResult struct {
 12304  	autorest.Response `json:"-"`
 12305  	// Value - READ-ONLY; List of userDefinedFunctions and their properties.
 12306  	Value *[]SQLUserDefinedFunctionGetResults `json:"value,omitempty"`
 12307  }
 12308  
 12309  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionListResult.
 12310  func (sudflr SQLUserDefinedFunctionListResult) MarshalJSON() ([]byte, error) {
 12311  	objectMap := make(map[string]interface{})
 12312  	return json.Marshal(objectMap)
 12313  }
 12314  
 12315  // SQLUserDefinedFunctionResource cosmos DB SQL userDefinedFunction resource object
 12316  type SQLUserDefinedFunctionResource struct {
 12317  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 12318  	ID *string `json:"id,omitempty"`
 12319  	// Body - Body of the User Defined Function
 12320  	Body *string `json:"body,omitempty"`
 12321  }
 12322  
 12323  // SystemData metadata pertaining to creation and last modification of the resource.
 12324  type SystemData struct {
 12325  	// CreatedBy - The identity that created the resource.
 12326  	CreatedBy *string `json:"createdBy,omitempty"`
 12327  	// CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
 12328  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
 12329  	// CreatedAt - The timestamp of resource creation (UTC).
 12330  	CreatedAt *date.Time `json:"createdAt,omitempty"`
 12331  	// LastModifiedBy - The identity that last modified the resource.
 12332  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
 12333  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
 12334  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
 12335  	// LastModifiedAt - The timestamp of resource last modification (UTC)
 12336  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
 12337  }
 12338  
 12339  // TableCreateUpdateParameters parameters to create and update Cosmos DB Table.
 12340  type TableCreateUpdateParameters struct {
 12341  	// TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
 12342  	*TableCreateUpdateProperties `json:"properties,omitempty"`
 12343  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12344  	ID *string `json:"id,omitempty"`
 12345  	// Name - READ-ONLY; The name of the ARM resource.
 12346  	Name *string `json:"name,omitempty"`
 12347  	// Type - READ-ONLY; The type of Azure resource.
 12348  	Type *string `json:"type,omitempty"`
 12349  	// Location - The location of the resource group to which the resource belongs.
 12350  	Location *string            `json:"location,omitempty"`
 12351  	Tags     map[string]*string `json:"tags"`
 12352  }
 12353  
 12354  // MarshalJSON is the custom marshaler for TableCreateUpdateParameters.
 12355  func (tcup TableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 12356  	objectMap := make(map[string]interface{})
 12357  	if tcup.TableCreateUpdateProperties != nil {
 12358  		objectMap["properties"] = tcup.TableCreateUpdateProperties
 12359  	}
 12360  	if tcup.Location != nil {
 12361  		objectMap["location"] = tcup.Location
 12362  	}
 12363  	if tcup.Tags != nil {
 12364  		objectMap["tags"] = tcup.Tags
 12365  	}
 12366  	return json.Marshal(objectMap)
 12367  }
 12368  
 12369  // UnmarshalJSON is the custom unmarshaler for TableCreateUpdateParameters struct.
 12370  func (tcup *TableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 12371  	var m map[string]*json.RawMessage
 12372  	err := json.Unmarshal(body, &m)
 12373  	if err != nil {
 12374  		return err
 12375  	}
 12376  	for k, v := range m {
 12377  		switch k {
 12378  		case "properties":
 12379  			if v != nil {
 12380  				var tableCreateUpdateProperties TableCreateUpdateProperties
 12381  				err = json.Unmarshal(*v, &tableCreateUpdateProperties)
 12382  				if err != nil {
 12383  					return err
 12384  				}
 12385  				tcup.TableCreateUpdateProperties = &tableCreateUpdateProperties
 12386  			}
 12387  		case "id":
 12388  			if v != nil {
 12389  				var ID string
 12390  				err = json.Unmarshal(*v, &ID)
 12391  				if err != nil {
 12392  					return err
 12393  				}
 12394  				tcup.ID = &ID
 12395  			}
 12396  		case "name":
 12397  			if v != nil {
 12398  				var name string
 12399  				err = json.Unmarshal(*v, &name)
 12400  				if err != nil {
 12401  					return err
 12402  				}
 12403  				tcup.Name = &name
 12404  			}
 12405  		case "type":
 12406  			if v != nil {
 12407  				var typeVar string
 12408  				err = json.Unmarshal(*v, &typeVar)
 12409  				if err != nil {
 12410  					return err
 12411  				}
 12412  				tcup.Type = &typeVar
 12413  			}
 12414  		case "location":
 12415  			if v != nil {
 12416  				var location string
 12417  				err = json.Unmarshal(*v, &location)
 12418  				if err != nil {
 12419  					return err
 12420  				}
 12421  				tcup.Location = &location
 12422  			}
 12423  		case "tags":
 12424  			if v != nil {
 12425  				var tags map[string]*string
 12426  				err = json.Unmarshal(*v, &tags)
 12427  				if err != nil {
 12428  					return err
 12429  				}
 12430  				tcup.Tags = tags
 12431  			}
 12432  		}
 12433  	}
 12434  
 12435  	return nil
 12436  }
 12437  
 12438  // TableCreateUpdateProperties properties to create and update Azure Cosmos DB Table.
 12439  type TableCreateUpdateProperties struct {
 12440  	// Resource - The standard JSON format of a Table
 12441  	Resource *TableResource `json:"resource,omitempty"`
 12442  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 12443  	Options *CreateUpdateOptions `json:"options,omitempty"`
 12444  }
 12445  
 12446  // TableGetProperties the properties of an Azure Cosmos Table
 12447  type TableGetProperties struct {
 12448  	Resource *TableGetPropertiesResource `json:"resource,omitempty"`
 12449  	Options  *TableGetPropertiesOptions  `json:"options,omitempty"`
 12450  }
 12451  
 12452  // TableGetPropertiesOptions ...
 12453  type TableGetPropertiesOptions struct {
 12454  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
 12455  	Throughput *int32 `json:"throughput,omitempty"`
 12456  	// AutoscaleSettings - Specifies the Autoscale settings.
 12457  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
 12458  }
 12459  
 12460  // TableGetPropertiesResource ...
 12461  type TableGetPropertiesResource struct {
 12462  	// ID - Name of the Cosmos DB table
 12463  	ID *string `json:"id,omitempty"`
 12464  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 12465  	Rid *string `json:"_rid,omitempty"`
 12466  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 12467  	Ts *float64 `json:"_ts,omitempty"`
 12468  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 12469  	Etag *string `json:"_etag,omitempty"`
 12470  }
 12471  
 12472  // MarshalJSON is the custom marshaler for TableGetPropertiesResource.
 12473  func (tgp TableGetPropertiesResource) MarshalJSON() ([]byte, error) {
 12474  	objectMap := make(map[string]interface{})
 12475  	if tgp.ID != nil {
 12476  		objectMap["id"] = tgp.ID
 12477  	}
 12478  	return json.Marshal(objectMap)
 12479  }
 12480  
 12481  // TableGetResults an Azure Cosmos DB Table.
 12482  type TableGetResults struct {
 12483  	autorest.Response `json:"-"`
 12484  	// TableGetProperties - The properties of an Azure Cosmos DB Table
 12485  	*TableGetProperties `json:"properties,omitempty"`
 12486  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12487  	ID *string `json:"id,omitempty"`
 12488  	// Name - READ-ONLY; The name of the ARM resource.
 12489  	Name *string `json:"name,omitempty"`
 12490  	// Type - READ-ONLY; The type of Azure resource.
 12491  	Type *string `json:"type,omitempty"`
 12492  	// Location - The location of the resource group to which the resource belongs.
 12493  	Location *string            `json:"location,omitempty"`
 12494  	Tags     map[string]*string `json:"tags"`
 12495  }
 12496  
 12497  // MarshalJSON is the custom marshaler for TableGetResults.
 12498  func (tgr TableGetResults) MarshalJSON() ([]byte, error) {
 12499  	objectMap := make(map[string]interface{})
 12500  	if tgr.TableGetProperties != nil {
 12501  		objectMap["properties"] = tgr.TableGetProperties
 12502  	}
 12503  	if tgr.Location != nil {
 12504  		objectMap["location"] = tgr.Location
 12505  	}
 12506  	if tgr.Tags != nil {
 12507  		objectMap["tags"] = tgr.Tags
 12508  	}
 12509  	return json.Marshal(objectMap)
 12510  }
 12511  
 12512  // UnmarshalJSON is the custom unmarshaler for TableGetResults struct.
 12513  func (tgr *TableGetResults) UnmarshalJSON(body []byte) error {
 12514  	var m map[string]*json.RawMessage
 12515  	err := json.Unmarshal(body, &m)
 12516  	if err != nil {
 12517  		return err
 12518  	}
 12519  	for k, v := range m {
 12520  		switch k {
 12521  		case "properties":
 12522  			if v != nil {
 12523  				var tableGetProperties TableGetProperties
 12524  				err = json.Unmarshal(*v, &tableGetProperties)
 12525  				if err != nil {
 12526  					return err
 12527  				}
 12528  				tgr.TableGetProperties = &tableGetProperties
 12529  			}
 12530  		case "id":
 12531  			if v != nil {
 12532  				var ID string
 12533  				err = json.Unmarshal(*v, &ID)
 12534  				if err != nil {
 12535  					return err
 12536  				}
 12537  				tgr.ID = &ID
 12538  			}
 12539  		case "name":
 12540  			if v != nil {
 12541  				var name string
 12542  				err = json.Unmarshal(*v, &name)
 12543  				if err != nil {
 12544  					return err
 12545  				}
 12546  				tgr.Name = &name
 12547  			}
 12548  		case "type":
 12549  			if v != nil {
 12550  				var typeVar string
 12551  				err = json.Unmarshal(*v, &typeVar)
 12552  				if err != nil {
 12553  					return err
 12554  				}
 12555  				tgr.Type = &typeVar
 12556  			}
 12557  		case "location":
 12558  			if v != nil {
 12559  				var location string
 12560  				err = json.Unmarshal(*v, &location)
 12561  				if err != nil {
 12562  					return err
 12563  				}
 12564  				tgr.Location = &location
 12565  			}
 12566  		case "tags":
 12567  			if v != nil {
 12568  				var tags map[string]*string
 12569  				err = json.Unmarshal(*v, &tags)
 12570  				if err != nil {
 12571  					return err
 12572  				}
 12573  				tgr.Tags = tags
 12574  			}
 12575  		}
 12576  	}
 12577  
 12578  	return nil
 12579  }
 12580  
 12581  // TableListResult the List operation response, that contains the Table and their properties.
 12582  type TableListResult struct {
 12583  	autorest.Response `json:"-"`
 12584  	// Value - READ-ONLY; List of Table and their properties.
 12585  	Value *[]TableGetResults `json:"value,omitempty"`
 12586  }
 12587  
 12588  // MarshalJSON is the custom marshaler for TableListResult.
 12589  func (tlr TableListResult) MarshalJSON() ([]byte, error) {
 12590  	objectMap := make(map[string]interface{})
 12591  	return json.Marshal(objectMap)
 12592  }
 12593  
 12594  // TableResource cosmos DB table resource object
 12595  type TableResource struct {
 12596  	// ID - Name of the Cosmos DB table
 12597  	ID *string `json:"id,omitempty"`
 12598  }
 12599  
 12600  // TableResourcesCreateUpdateTableFuture an abstraction for monitoring and retrieving the results of a
 12601  // long-running operation.
 12602  type TableResourcesCreateUpdateTableFuture struct {
 12603  	azure.FutureAPI
 12604  	// Result returns the result of the asynchronous operation.
 12605  	// If the operation has not completed it will return an error.
 12606  	Result func(TableResourcesClient) (TableGetResults, error)
 12607  }
 12608  
 12609  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12610  func (future *TableResourcesCreateUpdateTableFuture) UnmarshalJSON(body []byte) error {
 12611  	var azFuture azure.Future
 12612  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12613  		return err
 12614  	}
 12615  	future.FutureAPI = &azFuture
 12616  	future.Result = future.result
 12617  	return nil
 12618  }
 12619  
 12620  // result is the default implementation for TableResourcesCreateUpdateTableFuture.Result.
 12621  func (future *TableResourcesCreateUpdateTableFuture) result(client TableResourcesClient) (tgr TableGetResults, err error) {
 12622  	var done bool
 12623  	done, err = future.DoneWithContext(context.Background(), client)
 12624  	if err != nil {
 12625  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", future.Response(), "Polling failure")
 12626  		return
 12627  	}
 12628  	if !done {
 12629  		tgr.Response.Response = future.Response()
 12630  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesCreateUpdateTableFuture")
 12631  		return
 12632  	}
 12633  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12634  	if tgr.Response.Response, err = future.GetResult(sender); err == nil && tgr.Response.Response.StatusCode != http.StatusNoContent {
 12635  		tgr, err = client.CreateUpdateTableResponder(tgr.Response.Response)
 12636  		if err != nil {
 12637  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", tgr.Response.Response, "Failure responding to request")
 12638  		}
 12639  	}
 12640  	return
 12641  }
 12642  
 12643  // TableResourcesDeleteTableFuture an abstraction for monitoring and retrieving the results of a
 12644  // long-running operation.
 12645  type TableResourcesDeleteTableFuture struct {
 12646  	azure.FutureAPI
 12647  	// Result returns the result of the asynchronous operation.
 12648  	// If the operation has not completed it will return an error.
 12649  	Result func(TableResourcesClient) (autorest.Response, error)
 12650  }
 12651  
 12652  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12653  func (future *TableResourcesDeleteTableFuture) UnmarshalJSON(body []byte) error {
 12654  	var azFuture azure.Future
 12655  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12656  		return err
 12657  	}
 12658  	future.FutureAPI = &azFuture
 12659  	future.Result = future.result
 12660  	return nil
 12661  }
 12662  
 12663  // result is the default implementation for TableResourcesDeleteTableFuture.Result.
 12664  func (future *TableResourcesDeleteTableFuture) result(client TableResourcesClient) (ar autorest.Response, err error) {
 12665  	var done bool
 12666  	done, err = future.DoneWithContext(context.Background(), client)
 12667  	if err != nil {
 12668  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesDeleteTableFuture", "Result", future.Response(), "Polling failure")
 12669  		return
 12670  	}
 12671  	if !done {
 12672  		ar.Response = future.Response()
 12673  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesDeleteTableFuture")
 12674  		return
 12675  	}
 12676  	ar.Response = future.Response()
 12677  	return
 12678  }
 12679  
 12680  // TableResourcesMigrateTableToAutoscaleFuture an abstraction for monitoring and retrieving the results of
 12681  // a long-running operation.
 12682  type TableResourcesMigrateTableToAutoscaleFuture struct {
 12683  	azure.FutureAPI
 12684  	// Result returns the result of the asynchronous operation.
 12685  	// If the operation has not completed it will return an error.
 12686  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12687  }
 12688  
 12689  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12690  func (future *TableResourcesMigrateTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 12691  	var azFuture azure.Future
 12692  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12693  		return err
 12694  	}
 12695  	future.FutureAPI = &azFuture
 12696  	future.Result = future.result
 12697  	return nil
 12698  }
 12699  
 12700  // result is the default implementation for TableResourcesMigrateTableToAutoscaleFuture.Result.
 12701  func (future *TableResourcesMigrateTableToAutoscaleFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12702  	var done bool
 12703  	done, err = future.DoneWithContext(context.Background(), client)
 12704  	if err != nil {
 12705  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 12706  		return
 12707  	}
 12708  	if !done {
 12709  		tsgr.Response.Response = future.Response()
 12710  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToAutoscaleFuture")
 12711  		return
 12712  	}
 12713  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12714  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12715  		tsgr, err = client.MigrateTableToAutoscaleResponder(tsgr.Response.Response)
 12716  		if err != nil {
 12717  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12718  		}
 12719  	}
 12720  	return
 12721  }
 12722  
 12723  // TableResourcesMigrateTableToManualThroughputFuture an abstraction for monitoring and retrieving the
 12724  // results of a long-running operation.
 12725  type TableResourcesMigrateTableToManualThroughputFuture struct {
 12726  	azure.FutureAPI
 12727  	// Result returns the result of the asynchronous operation.
 12728  	// If the operation has not completed it will return an error.
 12729  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12730  }
 12731  
 12732  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12733  func (future *TableResourcesMigrateTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 12734  	var azFuture azure.Future
 12735  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12736  		return err
 12737  	}
 12738  	future.FutureAPI = &azFuture
 12739  	future.Result = future.result
 12740  	return nil
 12741  }
 12742  
 12743  // result is the default implementation for TableResourcesMigrateTableToManualThroughputFuture.Result.
 12744  func (future *TableResourcesMigrateTableToManualThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12745  	var done bool
 12746  	done, err = future.DoneWithContext(context.Background(), client)
 12747  	if err != nil {
 12748  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 12749  		return
 12750  	}
 12751  	if !done {
 12752  		tsgr.Response.Response = future.Response()
 12753  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToManualThroughputFuture")
 12754  		return
 12755  	}
 12756  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12757  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12758  		tsgr, err = client.MigrateTableToManualThroughputResponder(tsgr.Response.Response)
 12759  		if err != nil {
 12760  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12761  		}
 12762  	}
 12763  	return
 12764  }
 12765  
 12766  // TableResourcesUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of a
 12767  // long-running operation.
 12768  type TableResourcesUpdateTableThroughputFuture struct {
 12769  	azure.FutureAPI
 12770  	// Result returns the result of the asynchronous operation.
 12771  	// If the operation has not completed it will return an error.
 12772  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 12773  }
 12774  
 12775  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 12776  func (future *TableResourcesUpdateTableThroughputFuture) UnmarshalJSON(body []byte) error {
 12777  	var azFuture azure.Future
 12778  	if err := json.Unmarshal(body, &azFuture); err != nil {
 12779  		return err
 12780  	}
 12781  	future.FutureAPI = &azFuture
 12782  	future.Result = future.result
 12783  	return nil
 12784  }
 12785  
 12786  // result is the default implementation for TableResourcesUpdateTableThroughputFuture.Result.
 12787  func (future *TableResourcesUpdateTableThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 12788  	var done bool
 12789  	done, err = future.DoneWithContext(context.Background(), client)
 12790  	if err != nil {
 12791  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", future.Response(), "Polling failure")
 12792  		return
 12793  	}
 12794  	if !done {
 12795  		tsgr.Response.Response = future.Response()
 12796  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesUpdateTableThroughputFuture")
 12797  		return
 12798  	}
 12799  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 12800  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 12801  		tsgr, err = client.UpdateTableThroughputResponder(tsgr.Response.Response)
 12802  		if err != nil {
 12803  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 12804  		}
 12805  	}
 12806  	return
 12807  }
 12808  
 12809  // ThroughputPolicyResource cosmos DB resource throughput policy
 12810  type ThroughputPolicyResource struct {
 12811  	// IsEnabled - Determines whether the ThroughputPolicy is active or not
 12812  	IsEnabled *bool `json:"isEnabled,omitempty"`
 12813  	// IncrementPercent - Represents the percentage by which throughput can increase every time throughput policy kicks in.
 12814  	IncrementPercent *int32 `json:"incrementPercent,omitempty"`
 12815  }
 12816  
 12817  // ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput
 12818  type ThroughputSettingsGetProperties struct {
 12819  	Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"`
 12820  }
 12821  
 12822  // ThroughputSettingsGetPropertiesResource ...
 12823  type ThroughputSettingsGetPropertiesResource struct {
 12824  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 12825  	Throughput *int32 `json:"throughput,omitempty"`
 12826  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 12827  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 12828  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 12829  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 12830  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 12831  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 12832  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 12833  	Rid *string `json:"_rid,omitempty"`
 12834  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 12835  	Ts *float64 `json:"_ts,omitempty"`
 12836  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 12837  	Etag *string `json:"_etag,omitempty"`
 12838  }
 12839  
 12840  // MarshalJSON is the custom marshaler for ThroughputSettingsGetPropertiesResource.
 12841  func (tsgp ThroughputSettingsGetPropertiesResource) MarshalJSON() ([]byte, error) {
 12842  	objectMap := make(map[string]interface{})
 12843  	if tsgp.Throughput != nil {
 12844  		objectMap["throughput"] = tsgp.Throughput
 12845  	}
 12846  	if tsgp.AutoscaleSettings != nil {
 12847  		objectMap["autoscaleSettings"] = tsgp.AutoscaleSettings
 12848  	}
 12849  	return json.Marshal(objectMap)
 12850  }
 12851  
 12852  // ThroughputSettingsGetResults an Azure Cosmos DB resource throughput.
 12853  type ThroughputSettingsGetResults struct {
 12854  	autorest.Response `json:"-"`
 12855  	// ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput
 12856  	*ThroughputSettingsGetProperties `json:"properties,omitempty"`
 12857  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12858  	ID *string `json:"id,omitempty"`
 12859  	// Name - READ-ONLY; The name of the ARM resource.
 12860  	Name *string `json:"name,omitempty"`
 12861  	// Type - READ-ONLY; The type of Azure resource.
 12862  	Type *string `json:"type,omitempty"`
 12863  	// Location - The location of the resource group to which the resource belongs.
 12864  	Location *string            `json:"location,omitempty"`
 12865  	Tags     map[string]*string `json:"tags"`
 12866  }
 12867  
 12868  // MarshalJSON is the custom marshaler for ThroughputSettingsGetResults.
 12869  func (tsgr ThroughputSettingsGetResults) MarshalJSON() ([]byte, error) {
 12870  	objectMap := make(map[string]interface{})
 12871  	if tsgr.ThroughputSettingsGetProperties != nil {
 12872  		objectMap["properties"] = tsgr.ThroughputSettingsGetProperties
 12873  	}
 12874  	if tsgr.Location != nil {
 12875  		objectMap["location"] = tsgr.Location
 12876  	}
 12877  	if tsgr.Tags != nil {
 12878  		objectMap["tags"] = tsgr.Tags
 12879  	}
 12880  	return json.Marshal(objectMap)
 12881  }
 12882  
 12883  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsGetResults struct.
 12884  func (tsgr *ThroughputSettingsGetResults) UnmarshalJSON(body []byte) error {
 12885  	var m map[string]*json.RawMessage
 12886  	err := json.Unmarshal(body, &m)
 12887  	if err != nil {
 12888  		return err
 12889  	}
 12890  	for k, v := range m {
 12891  		switch k {
 12892  		case "properties":
 12893  			if v != nil {
 12894  				var throughputSettingsGetProperties ThroughputSettingsGetProperties
 12895  				err = json.Unmarshal(*v, &throughputSettingsGetProperties)
 12896  				if err != nil {
 12897  					return err
 12898  				}
 12899  				tsgr.ThroughputSettingsGetProperties = &throughputSettingsGetProperties
 12900  			}
 12901  		case "id":
 12902  			if v != nil {
 12903  				var ID string
 12904  				err = json.Unmarshal(*v, &ID)
 12905  				if err != nil {
 12906  					return err
 12907  				}
 12908  				tsgr.ID = &ID
 12909  			}
 12910  		case "name":
 12911  			if v != nil {
 12912  				var name string
 12913  				err = json.Unmarshal(*v, &name)
 12914  				if err != nil {
 12915  					return err
 12916  				}
 12917  				tsgr.Name = &name
 12918  			}
 12919  		case "type":
 12920  			if v != nil {
 12921  				var typeVar string
 12922  				err = json.Unmarshal(*v, &typeVar)
 12923  				if err != nil {
 12924  					return err
 12925  				}
 12926  				tsgr.Type = &typeVar
 12927  			}
 12928  		case "location":
 12929  			if v != nil {
 12930  				var location string
 12931  				err = json.Unmarshal(*v, &location)
 12932  				if err != nil {
 12933  					return err
 12934  				}
 12935  				tsgr.Location = &location
 12936  			}
 12937  		case "tags":
 12938  			if v != nil {
 12939  				var tags map[string]*string
 12940  				err = json.Unmarshal(*v, &tags)
 12941  				if err != nil {
 12942  					return err
 12943  				}
 12944  				tsgr.Tags = tags
 12945  			}
 12946  		}
 12947  	}
 12948  
 12949  	return nil
 12950  }
 12951  
 12952  // ThroughputSettingsResource cosmos DB resource throughput object. Either throughput is required or
 12953  // autoscaleSettings is required, but not both.
 12954  type ThroughputSettingsResource struct {
 12955  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 12956  	Throughput *int32 `json:"throughput,omitempty"`
 12957  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 12958  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 12959  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 12960  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 12961  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 12962  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 12963  }
 12964  
 12965  // MarshalJSON is the custom marshaler for ThroughputSettingsResource.
 12966  func (tsr ThroughputSettingsResource) MarshalJSON() ([]byte, error) {
 12967  	objectMap := make(map[string]interface{})
 12968  	if tsr.Throughput != nil {
 12969  		objectMap["throughput"] = tsr.Throughput
 12970  	}
 12971  	if tsr.AutoscaleSettings != nil {
 12972  		objectMap["autoscaleSettings"] = tsr.AutoscaleSettings
 12973  	}
 12974  	return json.Marshal(objectMap)
 12975  }
 12976  
 12977  // ThroughputSettingsUpdateParameters parameters to update Cosmos DB resource throughput.
 12978  type ThroughputSettingsUpdateParameters struct {
 12979  	// ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
 12980  	*ThroughputSettingsUpdateProperties `json:"properties,omitempty"`
 12981  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 12982  	ID *string `json:"id,omitempty"`
 12983  	// Name - READ-ONLY; The name of the ARM resource.
 12984  	Name *string `json:"name,omitempty"`
 12985  	// Type - READ-ONLY; The type of Azure resource.
 12986  	Type *string `json:"type,omitempty"`
 12987  	// Location - The location of the resource group to which the resource belongs.
 12988  	Location *string            `json:"location,omitempty"`
 12989  	Tags     map[string]*string `json:"tags"`
 12990  }
 12991  
 12992  // MarshalJSON is the custom marshaler for ThroughputSettingsUpdateParameters.
 12993  func (tsup ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error) {
 12994  	objectMap := make(map[string]interface{})
 12995  	if tsup.ThroughputSettingsUpdateProperties != nil {
 12996  		objectMap["properties"] = tsup.ThroughputSettingsUpdateProperties
 12997  	}
 12998  	if tsup.Location != nil {
 12999  		objectMap["location"] = tsup.Location
 13000  	}
 13001  	if tsup.Tags != nil {
 13002  		objectMap["tags"] = tsup.Tags
 13003  	}
 13004  	return json.Marshal(objectMap)
 13005  }
 13006  
 13007  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsUpdateParameters struct.
 13008  func (tsup *ThroughputSettingsUpdateParameters) UnmarshalJSON(body []byte) error {
 13009  	var m map[string]*json.RawMessage
 13010  	err := json.Unmarshal(body, &m)
 13011  	if err != nil {
 13012  		return err
 13013  	}
 13014  	for k, v := range m {
 13015  		switch k {
 13016  		case "properties":
 13017  			if v != nil {
 13018  				var throughputSettingsUpdateProperties ThroughputSettingsUpdateProperties
 13019  				err = json.Unmarshal(*v, &throughputSettingsUpdateProperties)
 13020  				if err != nil {
 13021  					return err
 13022  				}
 13023  				tsup.ThroughputSettingsUpdateProperties = &throughputSettingsUpdateProperties
 13024  			}
 13025  		case "id":
 13026  			if v != nil {
 13027  				var ID string
 13028  				err = json.Unmarshal(*v, &ID)
 13029  				if err != nil {
 13030  					return err
 13031  				}
 13032  				tsup.ID = &ID
 13033  			}
 13034  		case "name":
 13035  			if v != nil {
 13036  				var name string
 13037  				err = json.Unmarshal(*v, &name)
 13038  				if err != nil {
 13039  					return err
 13040  				}
 13041  				tsup.Name = &name
 13042  			}
 13043  		case "type":
 13044  			if v != nil {
 13045  				var typeVar string
 13046  				err = json.Unmarshal(*v, &typeVar)
 13047  				if err != nil {
 13048  					return err
 13049  				}
 13050  				tsup.Type = &typeVar
 13051  			}
 13052  		case "location":
 13053  			if v != nil {
 13054  				var location string
 13055  				err = json.Unmarshal(*v, &location)
 13056  				if err != nil {
 13057  					return err
 13058  				}
 13059  				tsup.Location = &location
 13060  			}
 13061  		case "tags":
 13062  			if v != nil {
 13063  				var tags map[string]*string
 13064  				err = json.Unmarshal(*v, &tags)
 13065  				if err != nil {
 13066  					return err
 13067  				}
 13068  				tsup.Tags = tags
 13069  			}
 13070  		}
 13071  	}
 13072  
 13073  	return nil
 13074  }
 13075  
 13076  // ThroughputSettingsUpdateProperties properties to update Azure Cosmos DB resource throughput.
 13077  type ThroughputSettingsUpdateProperties struct {
 13078  	// Resource - The standard JSON format of a resource throughput
 13079  	Resource *ThroughputSettingsResource `json:"resource,omitempty"`
 13080  }
 13081  
 13082  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
 13083  // which has 'tags' and a 'location'
 13084  type TrackedResource struct {
 13085  	// Tags - Resource tags.
 13086  	Tags map[string]*string `json:"tags"`
 13087  	// Location - The geo-location where the resource lives
 13088  	Location *string `json:"location,omitempty"`
 13089  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
 13090  	ID *string `json:"id,omitempty"`
 13091  	// Name - READ-ONLY; The name of the resource
 13092  	Name *string `json:"name,omitempty"`
 13093  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
 13094  	Type *string `json:"type,omitempty"`
 13095  }
 13096  
 13097  // MarshalJSON is the custom marshaler for TrackedResource.
 13098  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
 13099  	objectMap := make(map[string]interface{})
 13100  	if tr.Tags != nil {
 13101  		objectMap["tags"] = tr.Tags
 13102  	}
 13103  	if tr.Location != nil {
 13104  		objectMap["location"] = tr.Location
 13105  	}
 13106  	return json.Marshal(objectMap)
 13107  }
 13108  
 13109  // UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the
 13110  // Azure Cosmos DB service.
 13111  type UniqueKey struct {
 13112  	// Paths - List of paths must be unique for each document in the Azure Cosmos DB service
 13113  	Paths *[]string `json:"paths,omitempty"`
 13114  }
 13115  
 13116  // UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents
 13117  // in the collection in the Azure Cosmos DB service.
 13118  type UniqueKeyPolicy struct {
 13119  	// UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
 13120  	UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"`
 13121  }
 13122  
 13123  // Usage the usage data for a usage request.
 13124  type Usage struct {
 13125  	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
 13126  	Unit UnitType `json:"unit,omitempty"`
 13127  	// Name - READ-ONLY; The name information for the metric.
 13128  	Name *MetricName `json:"name,omitempty"`
 13129  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
 13130  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
 13131  	// Limit - READ-ONLY; Maximum value for this metric
 13132  	Limit *int64 `json:"limit,omitempty"`
 13133  	// CurrentValue - READ-ONLY; Current value for this metric
 13134  	CurrentValue *int64 `json:"currentValue,omitempty"`
 13135  }
 13136  
 13137  // MarshalJSON is the custom marshaler for Usage.
 13138  func (u Usage) MarshalJSON() ([]byte, error) {
 13139  	objectMap := make(map[string]interface{})
 13140  	if u.Unit != "" {
 13141  		objectMap["unit"] = u.Unit
 13142  	}
 13143  	return json.Marshal(objectMap)
 13144  }
 13145  
 13146  // UsagesResult the response to a list usage request.
 13147  type UsagesResult struct {
 13148  	autorest.Response `json:"-"`
 13149  	// Value - READ-ONLY; The list of usages for the database. A usage is a point in time metric
 13150  	Value *[]Usage `json:"value,omitempty"`
 13151  }
 13152  
 13153  // MarshalJSON is the custom marshaler for UsagesResult.
 13154  func (ur UsagesResult) MarshalJSON() ([]byte, error) {
 13155  	objectMap := make(map[string]interface{})
 13156  	return json.Marshal(objectMap)
 13157  }
 13158  
 13159  // VirtualNetworkRule virtual Network ACL Rule object
 13160  type VirtualNetworkRule struct {
 13161  	// ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
 13162  	ID *string `json:"id,omitempty"`
 13163  	// IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
 13164  	IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
 13165  }
 13166  

View as plain text