...

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

Documentation: github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2021-10-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/2021-10-15/documentdb"
    22  
    23  // AnalyticalStorageConfiguration analytical storage specific properties.
    24  type AnalyticalStorageConfiguration struct {
    25  	// SchemaType - Possible values include: 'AnalyticalStorageSchemaTypeWellDefined', 'AnalyticalStorageSchemaTypeFullFidelity'
    26  	SchemaType AnalyticalStorageSchemaType `json:"schemaType,omitempty"`
    27  }
    28  
    29  // APIProperties ...
    30  type APIProperties struct {
    31  	// ServerVersion - Describes the ServerVersion of an a MongoDB account. Possible values include: 'ServerVersionThreeFullStopTwo', 'ServerVersionThreeFullStopSix', 'ServerVersionFourFullStopZero', 'ServerVersionFourFullStopTwo'
    32  	ServerVersion ServerVersion `json:"serverVersion,omitempty"`
    33  }
    34  
    35  // ARMProxyResource the resource model definition for a ARM proxy resource. It will have everything other
    36  // than required location and tags
    37  type ARMProxyResource struct {
    38  	// ID - READ-ONLY; The unique resource identifier of the database account.
    39  	ID *string `json:"id,omitempty"`
    40  	// Name - READ-ONLY; The name of the database account.
    41  	Name *string `json:"name,omitempty"`
    42  	// Type - READ-ONLY; The type of Azure resource.
    43  	Type *string `json:"type,omitempty"`
    44  }
    45  
    46  // MarshalJSON is the custom marshaler for ARMProxyResource.
    47  func (apr ARMProxyResource) MarshalJSON() ([]byte, error) {
    48  	objectMap := make(map[string]interface{})
    49  	return json.Marshal(objectMap)
    50  }
    51  
    52  // ARMResourceProperties the core properties of ARM resources.
    53  type ARMResourceProperties struct {
    54  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
    55  	ID *string `json:"id,omitempty"`
    56  	// Name - READ-ONLY; The name of the ARM resource.
    57  	Name *string `json:"name,omitempty"`
    58  	// Type - READ-ONLY; The type of Azure resource.
    59  	Type *string `json:"type,omitempty"`
    60  	// Location - The location of the resource group to which the resource belongs.
    61  	Location *string            `json:"location,omitempty"`
    62  	Tags     map[string]*string `json:"tags"`
    63  }
    64  
    65  // MarshalJSON is the custom marshaler for ARMResourceProperties.
    66  func (arp ARMResourceProperties) MarshalJSON() ([]byte, error) {
    67  	objectMap := make(map[string]interface{})
    68  	if arp.Location != nil {
    69  		objectMap["location"] = arp.Location
    70  	}
    71  	if arp.Tags != nil {
    72  		objectMap["tags"] = arp.Tags
    73  	}
    74  	return json.Marshal(objectMap)
    75  }
    76  
    77  // AutoscaleSettings ...
    78  type AutoscaleSettings struct {
    79  	// MaxThroughput - Represents maximum throughput, the resource can scale up to.
    80  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    81  }
    82  
    83  // AutoscaleSettingsResource cosmos DB provisioned throughput settings object
    84  type AutoscaleSettingsResource struct {
    85  	// MaxThroughput - Represents maximum throughput container can scale up to.
    86  	MaxThroughput *int32 `json:"maxThroughput,omitempty"`
    87  	// AutoUpgradePolicy - Cosmos DB resource auto-upgrade policy
    88  	AutoUpgradePolicy *AutoUpgradePolicyResource `json:"autoUpgradePolicy,omitempty"`
    89  	// TargetMaxThroughput - READ-ONLY; Represents target maximum throughput container can scale up to once offer is no longer in pending state.
    90  	TargetMaxThroughput *int32 `json:"targetMaxThroughput,omitempty"`
    91  }
    92  
    93  // MarshalJSON is the custom marshaler for AutoscaleSettingsResource.
    94  func (asr AutoscaleSettingsResource) MarshalJSON() ([]byte, error) {
    95  	objectMap := make(map[string]interface{})
    96  	if asr.MaxThroughput != nil {
    97  		objectMap["maxThroughput"] = asr.MaxThroughput
    98  	}
    99  	if asr.AutoUpgradePolicy != nil {
   100  		objectMap["autoUpgradePolicy"] = asr.AutoUpgradePolicy
   101  	}
   102  	return json.Marshal(objectMap)
   103  }
   104  
   105  // AutoUpgradePolicyResource cosmos DB resource auto-upgrade policy
   106  type AutoUpgradePolicyResource struct {
   107  	// ThroughputPolicy - Represents throughput policy which service must adhere to for auto-upgrade
   108  	ThroughputPolicy *ThroughputPolicyResource `json:"throughputPolicy,omitempty"`
   109  }
   110  
   111  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   112  type AzureEntityResource struct {
   113  	// Etag - READ-ONLY; Resource Etag.
   114  	Etag *string `json:"etag,omitempty"`
   115  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   116  	ID *string `json:"id,omitempty"`
   117  	// Name - READ-ONLY; The name of the resource
   118  	Name *string `json:"name,omitempty"`
   119  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   120  	Type *string `json:"type,omitempty"`
   121  }
   122  
   123  // MarshalJSON is the custom marshaler for AzureEntityResource.
   124  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   125  	objectMap := make(map[string]interface{})
   126  	return json.Marshal(objectMap)
   127  }
   128  
   129  // BackupInformation backup information of a resource.
   130  type BackupInformation struct {
   131  	autorest.Response `json:"-"`
   132  	// ContinuousBackupInformation - Information about the status of continuous backups.
   133  	ContinuousBackupInformation *ContinuousBackupInformation `json:"continuousBackupInformation,omitempty"`
   134  }
   135  
   136  // BasicBackupPolicy the object representing the policy for taking backups on an account.
   137  type BasicBackupPolicy interface {
   138  	AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool)
   139  	AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool)
   140  	AsBackupPolicy() (*BackupPolicy, bool)
   141  }
   142  
   143  // BackupPolicy the object representing the policy for taking backups on an account.
   144  type BackupPolicy struct {
   145  	// MigrationState - The object representing the state of the migration between the backup policies.
   146  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
   147  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
   148  	Type Type `json:"type,omitempty"`
   149  }
   150  
   151  func unmarshalBasicBackupPolicy(body []byte) (BasicBackupPolicy, error) {
   152  	var m map[string]interface{}
   153  	err := json.Unmarshal(body, &m)
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  
   158  	switch m["type"] {
   159  	case string(TypePeriodic):
   160  		var pmbp PeriodicModeBackupPolicy
   161  		err := json.Unmarshal(body, &pmbp)
   162  		return pmbp, err
   163  	case string(TypeContinuous):
   164  		var cmbp ContinuousModeBackupPolicy
   165  		err := json.Unmarshal(body, &cmbp)
   166  		return cmbp, err
   167  	default:
   168  		var bp BackupPolicy
   169  		err := json.Unmarshal(body, &bp)
   170  		return bp, err
   171  	}
   172  }
   173  func unmarshalBasicBackupPolicyArray(body []byte) ([]BasicBackupPolicy, error) {
   174  	var rawMessages []*json.RawMessage
   175  	err := json.Unmarshal(body, &rawMessages)
   176  	if err != nil {
   177  		return nil, err
   178  	}
   179  
   180  	bpArray := make([]BasicBackupPolicy, len(rawMessages))
   181  
   182  	for index, rawMessage := range rawMessages {
   183  		bp, err := unmarshalBasicBackupPolicy(*rawMessage)
   184  		if err != nil {
   185  			return nil, err
   186  		}
   187  		bpArray[index] = bp
   188  	}
   189  	return bpArray, nil
   190  }
   191  
   192  // MarshalJSON is the custom marshaler for BackupPolicy.
   193  func (bp BackupPolicy) MarshalJSON() ([]byte, error) {
   194  	bp.Type = TypeBackupPolicy
   195  	objectMap := make(map[string]interface{})
   196  	if bp.MigrationState != nil {
   197  		objectMap["migrationState"] = bp.MigrationState
   198  	}
   199  	if bp.Type != "" {
   200  		objectMap["type"] = bp.Type
   201  	}
   202  	return json.Marshal(objectMap)
   203  }
   204  
   205  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   206  func (bp BackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
   207  	return nil, false
   208  }
   209  
   210  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   211  func (bp BackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
   212  	return nil, false
   213  }
   214  
   215  // AsBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   216  func (bp BackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
   217  	return &bp, true
   218  }
   219  
   220  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for BackupPolicy.
   221  func (bp BackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
   222  	return &bp, true
   223  }
   224  
   225  // BackupPolicyMigrationState the object representing the state of the migration between the backup
   226  // policies.
   227  type BackupPolicyMigrationState struct {
   228  	// Status - Describes the status of migration between backup policy types. Possible values include: 'BackupPolicyMigrationStatusInvalid', 'BackupPolicyMigrationStatusInProgress', 'BackupPolicyMigrationStatusCompleted', 'BackupPolicyMigrationStatusFailed'
   229  	Status BackupPolicyMigrationStatus `json:"status,omitempty"`
   230  	// TargetType - Describes the target backup policy type of the backup policy migration. Possible values include: 'BackupPolicyTypePeriodic', 'BackupPolicyTypeContinuous'
   231  	TargetType BackupPolicyType `json:"targetType,omitempty"`
   232  	// StartTime - Time at which the backup policy migration started (ISO-8601 format).
   233  	StartTime *date.Time `json:"startTime,omitempty"`
   234  }
   235  
   236  // Capability cosmos DB capability object
   237  type Capability struct {
   238  	// Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".
   239  	Name *string `json:"name,omitempty"`
   240  }
   241  
   242  // Capacity the object that represents all properties related to capacity enforcement on an account.
   243  type Capacity struct {
   244  	// 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.
   245  	TotalThroughputLimit *int32 `json:"totalThroughputLimit,omitempty"`
   246  }
   247  
   248  // CassandraClusterPublicStatus properties of a managed Cassandra cluster public status.
   249  type CassandraClusterPublicStatus struct {
   250  	autorest.Response `json:"-"`
   251  	ETag              *string                       `json:"eTag,omitempty"`
   252  	ReaperStatus      *ManagedCassandraReaperStatus `json:"reaperStatus,omitempty"`
   253  	// ConnectionErrors - List relevant information about any connection errors to the Datacenters.
   254  	ConnectionErrors *[]ConnectionError `json:"connectionErrors,omitempty"`
   255  	// DataCenters - List of the status of each datacenter in this cluster.
   256  	DataCenters *[]CassandraClusterPublicStatusDataCentersItem `json:"dataCenters,omitempty"`
   257  }
   258  
   259  // CassandraClusterPublicStatusDataCentersItem ...
   260  type CassandraClusterPublicStatusDataCentersItem struct {
   261  	// Name - The name of this Datacenter.
   262  	Name *string `json:"name,omitempty"`
   263  	// SeedNodes - A list of all seed nodes in the cluster, managed and unmanaged.
   264  	SeedNodes *[]string                                               `json:"seedNodes,omitempty"`
   265  	Nodes     *[]CassandraClusterPublicStatusDataCentersItemNodesItem `json:"nodes,omitempty"`
   266  }
   267  
   268  // CassandraClusterPublicStatusDataCentersItemNodesItem ...
   269  type CassandraClusterPublicStatusDataCentersItemNodesItem struct {
   270  	// Address - The node's IP address.
   271  	Address *string `json:"address,omitempty"`
   272  	// State - Possible values include: 'NodeStateNormal', 'NodeStateLeaving', 'NodeStateJoining', 'NodeStateMoving', 'NodeStateStopped'
   273  	State  NodeState `json:"state,omitempty"`
   274  	Status *string   `json:"status,omitempty"`
   275  	// 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.
   276  	Load *string `json:"load,omitempty"`
   277  	// Tokens - List of tokens this node covers.
   278  	Tokens *[]string `json:"tokens,omitempty"`
   279  	Size   *int32    `json:"size,omitempty"`
   280  	// HostID - The network ID of the node.
   281  	HostID *string `json:"hostID,omitempty"`
   282  	// Rack - The rack this node is part of.
   283  	Rack *string `json:"rack,omitempty"`
   284  	// Timestamp - The timestamp when these statistics were captured.
   285  	Timestamp *string `json:"timestamp,omitempty"`
   286  	// DiskUsedKB - The amount of disk used, in kB, of the directory /var/lib/cassandra.
   287  	DiskUsedKB *int64 `json:"diskUsedKB,omitempty"`
   288  	// DiskFreeKB - The amount of disk free, in kB, of the directory /var/lib/cassandra.
   289  	DiskFreeKB *int64 `json:"diskFreeKB,omitempty"`
   290  	// MemoryUsedKB - Used memory (calculated as total - free - buffers - cache), in kB.
   291  	MemoryUsedKB *int64 `json:"memoryUsedKB,omitempty"`
   292  	// MemoryBuffersAndCachedKB - Memory used by kernel buffers (Buffers in /proc/meminfo) and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
   293  	MemoryBuffersAndCachedKB *int64 `json:"memoryBuffersAndCachedKB,omitempty"`
   294  	// MemoryFreeKB - Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
   295  	MemoryFreeKB *int64 `json:"memoryFreeKB,omitempty"`
   296  	// MemoryTotalKB - Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB.
   297  	MemoryTotalKB *int64 `json:"memoryTotalKB,omitempty"`
   298  	// CPUUsage - A float representing the current system-wide CPU utilization as a percentage.
   299  	CPUUsage *float64 `json:"cpuUsage,omitempty"`
   300  }
   301  
   302  // CassandraClustersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   303  // long-running operation.
   304  type CassandraClustersCreateUpdateFuture struct {
   305  	azure.FutureAPI
   306  	// Result returns the result of the asynchronous operation.
   307  	// If the operation has not completed it will return an error.
   308  	Result func(CassandraClustersClient) (ClusterResource, error)
   309  }
   310  
   311  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   312  func (future *CassandraClustersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   313  	var azFuture azure.Future
   314  	if err := json.Unmarshal(body, &azFuture); err != nil {
   315  		return err
   316  	}
   317  	future.FutureAPI = &azFuture
   318  	future.Result = future.result
   319  	return nil
   320  }
   321  
   322  // result is the default implementation for CassandraClustersCreateUpdateFuture.Result.
   323  func (future *CassandraClustersCreateUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   324  	var done bool
   325  	done, err = future.DoneWithContext(context.Background(), client)
   326  	if err != nil {
   327  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   328  		return
   329  	}
   330  	if !done {
   331  		cr.Response.Response = future.Response()
   332  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersCreateUpdateFuture")
   333  		return
   334  	}
   335  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   336  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   337  		cr, err = client.CreateUpdateResponder(cr.Response.Response)
   338  		if err != nil {
   339  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersCreateUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   340  		}
   341  	}
   342  	return
   343  }
   344  
   345  // CassandraClustersDeallocateFuture an abstraction for monitoring and retrieving the results of a
   346  // long-running operation.
   347  type CassandraClustersDeallocateFuture struct {
   348  	azure.FutureAPI
   349  	// Result returns the result of the asynchronous operation.
   350  	// If the operation has not completed it will return an error.
   351  	Result func(CassandraClustersClient) (autorest.Response, error)
   352  }
   353  
   354  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   355  func (future *CassandraClustersDeallocateFuture) UnmarshalJSON(body []byte) error {
   356  	var azFuture azure.Future
   357  	if err := json.Unmarshal(body, &azFuture); err != nil {
   358  		return err
   359  	}
   360  	future.FutureAPI = &azFuture
   361  	future.Result = future.result
   362  	return nil
   363  }
   364  
   365  // result is the default implementation for CassandraClustersDeallocateFuture.Result.
   366  func (future *CassandraClustersDeallocateFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   367  	var done bool
   368  	done, err = future.DoneWithContext(context.Background(), client)
   369  	if err != nil {
   370  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersDeallocateFuture", "Result", future.Response(), "Polling failure")
   371  		return
   372  	}
   373  	if !done {
   374  		ar.Response = future.Response()
   375  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersDeallocateFuture")
   376  		return
   377  	}
   378  	ar.Response = future.Response()
   379  	return
   380  }
   381  
   382  // CassandraClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
   383  // operation.
   384  type CassandraClustersDeleteFuture struct {
   385  	azure.FutureAPI
   386  	// Result returns the result of the asynchronous operation.
   387  	// If the operation has not completed it will return an error.
   388  	Result func(CassandraClustersClient) (autorest.Response, error)
   389  }
   390  
   391  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   392  func (future *CassandraClustersDeleteFuture) UnmarshalJSON(body []byte) error {
   393  	var azFuture azure.Future
   394  	if err := json.Unmarshal(body, &azFuture); err != nil {
   395  		return err
   396  	}
   397  	future.FutureAPI = &azFuture
   398  	future.Result = future.result
   399  	return nil
   400  }
   401  
   402  // result is the default implementation for CassandraClustersDeleteFuture.Result.
   403  func (future *CassandraClustersDeleteFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   404  	var done bool
   405  	done, err = future.DoneWithContext(context.Background(), client)
   406  	if err != nil {
   407  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersDeleteFuture", "Result", future.Response(), "Polling failure")
   408  		return
   409  	}
   410  	if !done {
   411  		ar.Response = future.Response()
   412  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersDeleteFuture")
   413  		return
   414  	}
   415  	ar.Response = future.Response()
   416  	return
   417  }
   418  
   419  // CassandraClustersInvokeCommandFuture an abstraction for monitoring and retrieving the results of a
   420  // long-running operation.
   421  type CassandraClustersInvokeCommandFuture struct {
   422  	azure.FutureAPI
   423  	// Result returns the result of the asynchronous operation.
   424  	// If the operation has not completed it will return an error.
   425  	Result func(CassandraClustersClient) (CommandOutput, error)
   426  }
   427  
   428  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   429  func (future *CassandraClustersInvokeCommandFuture) UnmarshalJSON(body []byte) error {
   430  	var azFuture azure.Future
   431  	if err := json.Unmarshal(body, &azFuture); err != nil {
   432  		return err
   433  	}
   434  	future.FutureAPI = &azFuture
   435  	future.Result = future.result
   436  	return nil
   437  }
   438  
   439  // result is the default implementation for CassandraClustersInvokeCommandFuture.Result.
   440  func (future *CassandraClustersInvokeCommandFuture) result(client CassandraClustersClient) (co CommandOutput, err error) {
   441  	var done bool
   442  	done, err = future.DoneWithContext(context.Background(), client)
   443  	if err != nil {
   444  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersInvokeCommandFuture", "Result", future.Response(), "Polling failure")
   445  		return
   446  	}
   447  	if !done {
   448  		co.Response.Response = future.Response()
   449  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersInvokeCommandFuture")
   450  		return
   451  	}
   452  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   453  	if co.Response.Response, err = future.GetResult(sender); err == nil && co.Response.Response.StatusCode != http.StatusNoContent {
   454  		co, err = client.InvokeCommandResponder(co.Response.Response)
   455  		if err != nil {
   456  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersInvokeCommandFuture", "Result", co.Response.Response, "Failure responding to request")
   457  		}
   458  	}
   459  	return
   460  }
   461  
   462  // CassandraClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running
   463  // operation.
   464  type CassandraClustersStartFuture struct {
   465  	azure.FutureAPI
   466  	// Result returns the result of the asynchronous operation.
   467  	// If the operation has not completed it will return an error.
   468  	Result func(CassandraClustersClient) (autorest.Response, error)
   469  }
   470  
   471  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   472  func (future *CassandraClustersStartFuture) UnmarshalJSON(body []byte) error {
   473  	var azFuture azure.Future
   474  	if err := json.Unmarshal(body, &azFuture); err != nil {
   475  		return err
   476  	}
   477  	future.FutureAPI = &azFuture
   478  	future.Result = future.result
   479  	return nil
   480  }
   481  
   482  // result is the default implementation for CassandraClustersStartFuture.Result.
   483  func (future *CassandraClustersStartFuture) result(client CassandraClustersClient) (ar autorest.Response, err error) {
   484  	var done bool
   485  	done, err = future.DoneWithContext(context.Background(), client)
   486  	if err != nil {
   487  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersStartFuture", "Result", future.Response(), "Polling failure")
   488  		return
   489  	}
   490  	if !done {
   491  		ar.Response = future.Response()
   492  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersStartFuture")
   493  		return
   494  	}
   495  	ar.Response = future.Response()
   496  	return
   497  }
   498  
   499  // CassandraClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
   500  // operation.
   501  type CassandraClustersUpdateFuture struct {
   502  	azure.FutureAPI
   503  	// Result returns the result of the asynchronous operation.
   504  	// If the operation has not completed it will return an error.
   505  	Result func(CassandraClustersClient) (ClusterResource, error)
   506  }
   507  
   508  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   509  func (future *CassandraClustersUpdateFuture) UnmarshalJSON(body []byte) error {
   510  	var azFuture azure.Future
   511  	if err := json.Unmarshal(body, &azFuture); err != nil {
   512  		return err
   513  	}
   514  	future.FutureAPI = &azFuture
   515  	future.Result = future.result
   516  	return nil
   517  }
   518  
   519  // result is the default implementation for CassandraClustersUpdateFuture.Result.
   520  func (future *CassandraClustersUpdateFuture) result(client CassandraClustersClient) (cr ClusterResource, err error) {
   521  	var done bool
   522  	done, err = future.DoneWithContext(context.Background(), client)
   523  	if err != nil {
   524  		err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", future.Response(), "Polling failure")
   525  		return
   526  	}
   527  	if !done {
   528  		cr.Response.Response = future.Response()
   529  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraClustersUpdateFuture")
   530  		return
   531  	}
   532  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   533  	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
   534  		cr, err = client.UpdateResponder(cr.Response.Response)
   535  		if err != nil {
   536  			err = autorest.NewErrorWithError(err, "documentdb.CassandraClustersUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
   537  		}
   538  	}
   539  	return
   540  }
   541  
   542  // CassandraDataCentersCreateUpdateFuture an abstraction for monitoring and retrieving the results of a
   543  // long-running operation.
   544  type CassandraDataCentersCreateUpdateFuture struct {
   545  	azure.FutureAPI
   546  	// Result returns the result of the asynchronous operation.
   547  	// If the operation has not completed it will return an error.
   548  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   549  }
   550  
   551  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   552  func (future *CassandraDataCentersCreateUpdateFuture) UnmarshalJSON(body []byte) error {
   553  	var azFuture azure.Future
   554  	if err := json.Unmarshal(body, &azFuture); err != nil {
   555  		return err
   556  	}
   557  	future.FutureAPI = &azFuture
   558  	future.Result = future.result
   559  	return nil
   560  }
   561  
   562  // result is the default implementation for CassandraDataCentersCreateUpdateFuture.Result.
   563  func (future *CassandraDataCentersCreateUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   564  	var done bool
   565  	done, err = future.DoneWithContext(context.Background(), client)
   566  	if err != nil {
   567  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", future.Response(), "Polling failure")
   568  		return
   569  	}
   570  	if !done {
   571  		dcr.Response.Response = future.Response()
   572  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersCreateUpdateFuture")
   573  		return
   574  	}
   575  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   576  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   577  		dcr, err = client.CreateUpdateResponder(dcr.Response.Response)
   578  		if err != nil {
   579  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersCreateUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   580  		}
   581  	}
   582  	return
   583  }
   584  
   585  // CassandraDataCentersDeleteFuture an abstraction for monitoring and retrieving the results of a
   586  // long-running operation.
   587  type CassandraDataCentersDeleteFuture struct {
   588  	azure.FutureAPI
   589  	// Result returns the result of the asynchronous operation.
   590  	// If the operation has not completed it will return an error.
   591  	Result func(CassandraDataCentersClient) (autorest.Response, error)
   592  }
   593  
   594  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   595  func (future *CassandraDataCentersDeleteFuture) UnmarshalJSON(body []byte) error {
   596  	var azFuture azure.Future
   597  	if err := json.Unmarshal(body, &azFuture); err != nil {
   598  		return err
   599  	}
   600  	future.FutureAPI = &azFuture
   601  	future.Result = future.result
   602  	return nil
   603  }
   604  
   605  // result is the default implementation for CassandraDataCentersDeleteFuture.Result.
   606  func (future *CassandraDataCentersDeleteFuture) result(client CassandraDataCentersClient) (ar autorest.Response, err error) {
   607  	var done bool
   608  	done, err = future.DoneWithContext(context.Background(), client)
   609  	if err != nil {
   610  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersDeleteFuture", "Result", future.Response(), "Polling failure")
   611  		return
   612  	}
   613  	if !done {
   614  		ar.Response = future.Response()
   615  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersDeleteFuture")
   616  		return
   617  	}
   618  	ar.Response = future.Response()
   619  	return
   620  }
   621  
   622  // CassandraDataCentersUpdateFuture an abstraction for monitoring and retrieving the results of a
   623  // long-running operation.
   624  type CassandraDataCentersUpdateFuture struct {
   625  	azure.FutureAPI
   626  	// Result returns the result of the asynchronous operation.
   627  	// If the operation has not completed it will return an error.
   628  	Result func(CassandraDataCentersClient) (DataCenterResource, error)
   629  }
   630  
   631  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   632  func (future *CassandraDataCentersUpdateFuture) UnmarshalJSON(body []byte) error {
   633  	var azFuture azure.Future
   634  	if err := json.Unmarshal(body, &azFuture); err != nil {
   635  		return err
   636  	}
   637  	future.FutureAPI = &azFuture
   638  	future.Result = future.result
   639  	return nil
   640  }
   641  
   642  // result is the default implementation for CassandraDataCentersUpdateFuture.Result.
   643  func (future *CassandraDataCentersUpdateFuture) result(client CassandraDataCentersClient) (dcr DataCenterResource, err error) {
   644  	var done bool
   645  	done, err = future.DoneWithContext(context.Background(), client)
   646  	if err != nil {
   647  		err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", future.Response(), "Polling failure")
   648  		return
   649  	}
   650  	if !done {
   651  		dcr.Response.Response = future.Response()
   652  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraDataCentersUpdateFuture")
   653  		return
   654  	}
   655  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   656  	if dcr.Response.Response, err = future.GetResult(sender); err == nil && dcr.Response.Response.StatusCode != http.StatusNoContent {
   657  		dcr, err = client.UpdateResponder(dcr.Response.Response)
   658  		if err != nil {
   659  			err = autorest.NewErrorWithError(err, "documentdb.CassandraDataCentersUpdateFuture", "Result", dcr.Response.Response, "Failure responding to request")
   660  		}
   661  	}
   662  	return
   663  }
   664  
   665  // CassandraKeyspaceCreateUpdateParameters parameters to create and update Cosmos DB Cassandra keyspace.
   666  type CassandraKeyspaceCreateUpdateParameters struct {
   667  	// CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
   668  	*CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"`
   669  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   670  	ID *string `json:"id,omitempty"`
   671  	// Name - READ-ONLY; The name of the ARM resource.
   672  	Name *string `json:"name,omitempty"`
   673  	// Type - READ-ONLY; The type of Azure resource.
   674  	Type *string `json:"type,omitempty"`
   675  	// Location - The location of the resource group to which the resource belongs.
   676  	Location *string            `json:"location,omitempty"`
   677  	Tags     map[string]*string `json:"tags"`
   678  }
   679  
   680  // MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateParameters.
   681  func (ckcup CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
   682  	objectMap := make(map[string]interface{})
   683  	if ckcup.CassandraKeyspaceCreateUpdateProperties != nil {
   684  		objectMap["properties"] = ckcup.CassandraKeyspaceCreateUpdateProperties
   685  	}
   686  	if ckcup.Location != nil {
   687  		objectMap["location"] = ckcup.Location
   688  	}
   689  	if ckcup.Tags != nil {
   690  		objectMap["tags"] = ckcup.Tags
   691  	}
   692  	return json.Marshal(objectMap)
   693  }
   694  
   695  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceCreateUpdateParameters struct.
   696  func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) error {
   697  	var m map[string]*json.RawMessage
   698  	err := json.Unmarshal(body, &m)
   699  	if err != nil {
   700  		return err
   701  	}
   702  	for k, v := range m {
   703  		switch k {
   704  		case "properties":
   705  			if v != nil {
   706  				var cassandraKeyspaceCreateUpdateProperties CassandraKeyspaceCreateUpdateProperties
   707  				err = json.Unmarshal(*v, &cassandraKeyspaceCreateUpdateProperties)
   708  				if err != nil {
   709  					return err
   710  				}
   711  				ckcup.CassandraKeyspaceCreateUpdateProperties = &cassandraKeyspaceCreateUpdateProperties
   712  			}
   713  		case "id":
   714  			if v != nil {
   715  				var ID string
   716  				err = json.Unmarshal(*v, &ID)
   717  				if err != nil {
   718  					return err
   719  				}
   720  				ckcup.ID = &ID
   721  			}
   722  		case "name":
   723  			if v != nil {
   724  				var name string
   725  				err = json.Unmarshal(*v, &name)
   726  				if err != nil {
   727  					return err
   728  				}
   729  				ckcup.Name = &name
   730  			}
   731  		case "type":
   732  			if v != nil {
   733  				var typeVar string
   734  				err = json.Unmarshal(*v, &typeVar)
   735  				if err != nil {
   736  					return err
   737  				}
   738  				ckcup.Type = &typeVar
   739  			}
   740  		case "location":
   741  			if v != nil {
   742  				var location string
   743  				err = json.Unmarshal(*v, &location)
   744  				if err != nil {
   745  					return err
   746  				}
   747  				ckcup.Location = &location
   748  			}
   749  		case "tags":
   750  			if v != nil {
   751  				var tags map[string]*string
   752  				err = json.Unmarshal(*v, &tags)
   753  				if err != nil {
   754  					return err
   755  				}
   756  				ckcup.Tags = tags
   757  			}
   758  		}
   759  	}
   760  
   761  	return nil
   762  }
   763  
   764  // CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra
   765  // keyspace.
   766  type CassandraKeyspaceCreateUpdateProperties struct {
   767  	// Resource - The standard JSON format of a Cassandra keyspace
   768  	Resource *CassandraKeyspaceResource `json:"resource,omitempty"`
   769  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
   770  	Options *CreateUpdateOptions `json:"options,omitempty"`
   771  }
   772  
   773  // CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace
   774  type CassandraKeyspaceGetProperties struct {
   775  	Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"`
   776  	Options  *CassandraKeyspaceGetPropertiesOptions  `json:"options,omitempty"`
   777  }
   778  
   779  // CassandraKeyspaceGetPropertiesOptions ...
   780  type CassandraKeyspaceGetPropertiesOptions struct {
   781  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
   782  	Throughput *int32 `json:"throughput,omitempty"`
   783  	// AutoscaleSettings - Specifies the Autoscale settings.
   784  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
   785  }
   786  
   787  // CassandraKeyspaceGetPropertiesResource ...
   788  type CassandraKeyspaceGetPropertiesResource struct {
   789  	// ID - Name of the Cosmos DB Cassandra keyspace
   790  	ID *string `json:"id,omitempty"`
   791  	// Rid - READ-ONLY; A system generated property. A unique identifier.
   792  	Rid *string `json:"_rid,omitempty"`
   793  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
   794  	Ts *float64 `json:"_ts,omitempty"`
   795  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
   796  	Etag *string `json:"_etag,omitempty"`
   797  }
   798  
   799  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetPropertiesResource.
   800  func (ckgp CassandraKeyspaceGetPropertiesResource) MarshalJSON() ([]byte, error) {
   801  	objectMap := make(map[string]interface{})
   802  	if ckgp.ID != nil {
   803  		objectMap["id"] = ckgp.ID
   804  	}
   805  	return json.Marshal(objectMap)
   806  }
   807  
   808  // CassandraKeyspaceGetResults an Azure Cosmos DB Cassandra keyspace.
   809  type CassandraKeyspaceGetResults struct {
   810  	autorest.Response `json:"-"`
   811  	// CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace
   812  	*CassandraKeyspaceGetProperties `json:"properties,omitempty"`
   813  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
   814  	ID *string `json:"id,omitempty"`
   815  	// Name - READ-ONLY; The name of the ARM resource.
   816  	Name *string `json:"name,omitempty"`
   817  	// Type - READ-ONLY; The type of Azure resource.
   818  	Type *string `json:"type,omitempty"`
   819  	// Location - The location of the resource group to which the resource belongs.
   820  	Location *string            `json:"location,omitempty"`
   821  	Tags     map[string]*string `json:"tags"`
   822  }
   823  
   824  // MarshalJSON is the custom marshaler for CassandraKeyspaceGetResults.
   825  func (ckgr CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error) {
   826  	objectMap := make(map[string]interface{})
   827  	if ckgr.CassandraKeyspaceGetProperties != nil {
   828  		objectMap["properties"] = ckgr.CassandraKeyspaceGetProperties
   829  	}
   830  	if ckgr.Location != nil {
   831  		objectMap["location"] = ckgr.Location
   832  	}
   833  	if ckgr.Tags != nil {
   834  		objectMap["tags"] = ckgr.Tags
   835  	}
   836  	return json.Marshal(objectMap)
   837  }
   838  
   839  // UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceGetResults struct.
   840  func (ckgr *CassandraKeyspaceGetResults) UnmarshalJSON(body []byte) error {
   841  	var m map[string]*json.RawMessage
   842  	err := json.Unmarshal(body, &m)
   843  	if err != nil {
   844  		return err
   845  	}
   846  	for k, v := range m {
   847  		switch k {
   848  		case "properties":
   849  			if v != nil {
   850  				var cassandraKeyspaceGetProperties CassandraKeyspaceGetProperties
   851  				err = json.Unmarshal(*v, &cassandraKeyspaceGetProperties)
   852  				if err != nil {
   853  					return err
   854  				}
   855  				ckgr.CassandraKeyspaceGetProperties = &cassandraKeyspaceGetProperties
   856  			}
   857  		case "id":
   858  			if v != nil {
   859  				var ID string
   860  				err = json.Unmarshal(*v, &ID)
   861  				if err != nil {
   862  					return err
   863  				}
   864  				ckgr.ID = &ID
   865  			}
   866  		case "name":
   867  			if v != nil {
   868  				var name string
   869  				err = json.Unmarshal(*v, &name)
   870  				if err != nil {
   871  					return err
   872  				}
   873  				ckgr.Name = &name
   874  			}
   875  		case "type":
   876  			if v != nil {
   877  				var typeVar string
   878  				err = json.Unmarshal(*v, &typeVar)
   879  				if err != nil {
   880  					return err
   881  				}
   882  				ckgr.Type = &typeVar
   883  			}
   884  		case "location":
   885  			if v != nil {
   886  				var location string
   887  				err = json.Unmarshal(*v, &location)
   888  				if err != nil {
   889  					return err
   890  				}
   891  				ckgr.Location = &location
   892  			}
   893  		case "tags":
   894  			if v != nil {
   895  				var tags map[string]*string
   896  				err = json.Unmarshal(*v, &tags)
   897  				if err != nil {
   898  					return err
   899  				}
   900  				ckgr.Tags = tags
   901  			}
   902  		}
   903  	}
   904  
   905  	return nil
   906  }
   907  
   908  // CassandraKeyspaceListResult the List operation response, that contains the Cassandra keyspaces and their
   909  // properties.
   910  type CassandraKeyspaceListResult struct {
   911  	autorest.Response `json:"-"`
   912  	// Value - READ-ONLY; List of Cassandra keyspaces and their properties.
   913  	Value *[]CassandraKeyspaceGetResults `json:"value,omitempty"`
   914  }
   915  
   916  // MarshalJSON is the custom marshaler for CassandraKeyspaceListResult.
   917  func (cklr CassandraKeyspaceListResult) MarshalJSON() ([]byte, error) {
   918  	objectMap := make(map[string]interface{})
   919  	return json.Marshal(objectMap)
   920  }
   921  
   922  // CassandraKeyspaceResource cosmos DB Cassandra keyspace resource object
   923  type CassandraKeyspaceResource struct {
   924  	// ID - Name of the Cosmos DB Cassandra keyspace
   925  	ID *string `json:"id,omitempty"`
   926  }
   927  
   928  // CassandraPartitionKey cosmos DB Cassandra table partition key
   929  type CassandraPartitionKey struct {
   930  	// Name - Name of the Cosmos DB Cassandra table partition key
   931  	Name *string `json:"name,omitempty"`
   932  }
   933  
   934  // CassandraResourcesCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the
   935  // results of a long-running operation.
   936  type CassandraResourcesCreateUpdateCassandraKeyspaceFuture struct {
   937  	azure.FutureAPI
   938  	// Result returns the result of the asynchronous operation.
   939  	// If the operation has not completed it will return an error.
   940  	Result func(CassandraResourcesClient) (CassandraKeyspaceGetResults, error)
   941  }
   942  
   943  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   944  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
   945  	var azFuture azure.Future
   946  	if err := json.Unmarshal(body, &azFuture); err != nil {
   947  		return err
   948  	}
   949  	future.FutureAPI = &azFuture
   950  	future.Result = future.result
   951  	return nil
   952  }
   953  
   954  // result is the default implementation for CassandraResourcesCreateUpdateCassandraKeyspaceFuture.Result.
   955  func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ckgr CassandraKeyspaceGetResults, err error) {
   956  	var done bool
   957  	done, err = future.DoneWithContext(context.Background(), client)
   958  	if err != nil {
   959  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
   960  		return
   961  	}
   962  	if !done {
   963  		ckgr.Response.Response = future.Response()
   964  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture")
   965  		return
   966  	}
   967  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   968  	if ckgr.Response.Response, err = future.GetResult(sender); err == nil && ckgr.Response.Response.StatusCode != http.StatusNoContent {
   969  		ckgr, err = client.CreateUpdateCassandraKeyspaceResponder(ckgr.Response.Response)
   970  		if err != nil {
   971  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", ckgr.Response.Response, "Failure responding to request")
   972  		}
   973  	}
   974  	return
   975  }
   976  
   977  // CassandraResourcesCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the
   978  // results of a long-running operation.
   979  type CassandraResourcesCreateUpdateCassandraTableFuture struct {
   980  	azure.FutureAPI
   981  	// Result returns the result of the asynchronous operation.
   982  	// If the operation has not completed it will return an error.
   983  	Result func(CassandraResourcesClient) (CassandraTableGetResults, error)
   984  }
   985  
   986  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   987  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) UnmarshalJSON(body []byte) error {
   988  	var azFuture azure.Future
   989  	if err := json.Unmarshal(body, &azFuture); err != nil {
   990  		return err
   991  	}
   992  	future.FutureAPI = &azFuture
   993  	future.Result = future.result
   994  	return nil
   995  }
   996  
   997  // result is the default implementation for CassandraResourcesCreateUpdateCassandraTableFuture.Result.
   998  func (future *CassandraResourcesCreateUpdateCassandraTableFuture) result(client CassandraResourcesClient) (ctgr CassandraTableGetResults, err error) {
   999  	var done bool
  1000  	done, err = future.DoneWithContext(context.Background(), client)
  1001  	if err != nil {
  1002  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", future.Response(), "Polling failure")
  1003  		return
  1004  	}
  1005  	if !done {
  1006  		ctgr.Response.Response = future.Response()
  1007  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraTableFuture")
  1008  		return
  1009  	}
  1010  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1011  	if ctgr.Response.Response, err = future.GetResult(sender); err == nil && ctgr.Response.Response.StatusCode != http.StatusNoContent {
  1012  		ctgr, err = client.CreateUpdateCassandraTableResponder(ctgr.Response.Response)
  1013  		if err != nil {
  1014  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", ctgr.Response.Response, "Failure responding to request")
  1015  		}
  1016  	}
  1017  	return
  1018  }
  1019  
  1020  // CassandraResourcesDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results
  1021  // of a long-running operation.
  1022  type CassandraResourcesDeleteCassandraKeyspaceFuture struct {
  1023  	azure.FutureAPI
  1024  	// Result returns the result of the asynchronous operation.
  1025  	// If the operation has not completed it will return an error.
  1026  	Result func(CassandraResourcesClient) (autorest.Response, error)
  1027  }
  1028  
  1029  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1030  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) UnmarshalJSON(body []byte) error {
  1031  	var azFuture azure.Future
  1032  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1033  		return err
  1034  	}
  1035  	future.FutureAPI = &azFuture
  1036  	future.Result = future.result
  1037  	return nil
  1038  }
  1039  
  1040  // result is the default implementation for CassandraResourcesDeleteCassandraKeyspaceFuture.Result.
  1041  func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
  1042  	var done bool
  1043  	done, err = future.DoneWithContext(context.Background(), client)
  1044  	if err != nil {
  1045  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
  1046  		return
  1047  	}
  1048  	if !done {
  1049  		ar.Response = future.Response()
  1050  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture")
  1051  		return
  1052  	}
  1053  	ar.Response = future.Response()
  1054  	return
  1055  }
  1056  
  1057  // CassandraResourcesDeleteCassandraTableFuture an abstraction for monitoring and retrieving the results of
  1058  // a long-running operation.
  1059  type CassandraResourcesDeleteCassandraTableFuture struct {
  1060  	azure.FutureAPI
  1061  	// Result returns the result of the asynchronous operation.
  1062  	// If the operation has not completed it will return an error.
  1063  	Result func(CassandraResourcesClient) (autorest.Response, error)
  1064  }
  1065  
  1066  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1067  func (future *CassandraResourcesDeleteCassandraTableFuture) UnmarshalJSON(body []byte) error {
  1068  	var azFuture azure.Future
  1069  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1070  		return err
  1071  	}
  1072  	future.FutureAPI = &azFuture
  1073  	future.Result = future.result
  1074  	return nil
  1075  }
  1076  
  1077  // result is the default implementation for CassandraResourcesDeleteCassandraTableFuture.Result.
  1078  func (future *CassandraResourcesDeleteCassandraTableFuture) result(client CassandraResourcesClient) (ar autorest.Response, err error) {
  1079  	var done bool
  1080  	done, err = future.DoneWithContext(context.Background(), client)
  1081  	if err != nil {
  1082  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraTableFuture", "Result", future.Response(), "Polling failure")
  1083  		return
  1084  	}
  1085  	if !done {
  1086  		ar.Response = future.Response()
  1087  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraTableFuture")
  1088  		return
  1089  	}
  1090  	ar.Response = future.Response()
  1091  	return
  1092  }
  1093  
  1094  // CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture an abstraction for monitoring and retrieving
  1095  // the results of a long-running operation.
  1096  type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture struct {
  1097  	azure.FutureAPI
  1098  	// Result returns the result of the asynchronous operation.
  1099  	// If the operation has not completed it will return an error.
  1100  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1101  }
  1102  
  1103  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1104  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1105  	var azFuture azure.Future
  1106  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1107  		return err
  1108  	}
  1109  	future.FutureAPI = &azFuture
  1110  	future.Result = future.result
  1111  	return nil
  1112  }
  1113  
  1114  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture.Result.
  1115  func (future *CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1116  	var done bool
  1117  	done, err = future.DoneWithContext(context.Background(), client)
  1118  	if err != nil {
  1119  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1120  		return
  1121  	}
  1122  	if !done {
  1123  		tsgr.Response.Response = future.Response()
  1124  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture")
  1125  		return
  1126  	}
  1127  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1128  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1129  		tsgr, err = client.MigrateCassandraKeyspaceToAutoscaleResponder(tsgr.Response.Response)
  1130  		if err != nil {
  1131  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1132  		}
  1133  	}
  1134  	return
  1135  }
  1136  
  1137  // CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture an abstraction for monitoring and
  1138  // retrieving the results of a long-running operation.
  1139  type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture struct {
  1140  	azure.FutureAPI
  1141  	// Result returns the result of the asynchronous operation.
  1142  	// If the operation has not completed it will return an error.
  1143  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1144  }
  1145  
  1146  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1147  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1148  	var azFuture azure.Future
  1149  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1150  		return err
  1151  	}
  1152  	future.FutureAPI = &azFuture
  1153  	future.Result = future.result
  1154  	return nil
  1155  }
  1156  
  1157  // result is the default implementation for CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture.Result.
  1158  func (future *CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1159  	var done bool
  1160  	done, err = future.DoneWithContext(context.Background(), client)
  1161  	if err != nil {
  1162  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1163  		return
  1164  	}
  1165  	if !done {
  1166  		tsgr.Response.Response = future.Response()
  1167  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture")
  1168  		return
  1169  	}
  1170  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1171  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1172  		tsgr, err = client.MigrateCassandraKeyspaceToManualThroughputResponder(tsgr.Response.Response)
  1173  		if err != nil {
  1174  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraKeyspaceToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1175  		}
  1176  	}
  1177  	return
  1178  }
  1179  
  1180  // CassandraResourcesMigrateCassandraTableToAutoscaleFuture an abstraction for monitoring and retrieving
  1181  // the results of a long-running operation.
  1182  type CassandraResourcesMigrateCassandraTableToAutoscaleFuture struct {
  1183  	azure.FutureAPI
  1184  	// Result returns the result of the asynchronous operation.
  1185  	// If the operation has not completed it will return an error.
  1186  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1187  }
  1188  
  1189  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1190  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  1191  	var azFuture azure.Future
  1192  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1193  		return err
  1194  	}
  1195  	future.FutureAPI = &azFuture
  1196  	future.Result = future.result
  1197  	return nil
  1198  }
  1199  
  1200  // result is the default implementation for CassandraResourcesMigrateCassandraTableToAutoscaleFuture.Result.
  1201  func (future *CassandraResourcesMigrateCassandraTableToAutoscaleFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1202  	var done bool
  1203  	done, err = future.DoneWithContext(context.Background(), client)
  1204  	if err != nil {
  1205  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  1206  		return
  1207  	}
  1208  	if !done {
  1209  		tsgr.Response.Response = future.Response()
  1210  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture")
  1211  		return
  1212  	}
  1213  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1214  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1215  		tsgr, err = client.MigrateCassandraTableToAutoscaleResponder(tsgr.Response.Response)
  1216  		if err != nil {
  1217  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1218  		}
  1219  	}
  1220  	return
  1221  }
  1222  
  1223  // CassandraResourcesMigrateCassandraTableToManualThroughputFuture an abstraction for monitoring and
  1224  // retrieving the results of a long-running operation.
  1225  type CassandraResourcesMigrateCassandraTableToManualThroughputFuture struct {
  1226  	azure.FutureAPI
  1227  	// Result returns the result of the asynchronous operation.
  1228  	// If the operation has not completed it will return an error.
  1229  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1230  }
  1231  
  1232  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1233  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  1234  	var azFuture azure.Future
  1235  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1236  		return err
  1237  	}
  1238  	future.FutureAPI = &azFuture
  1239  	future.Result = future.result
  1240  	return nil
  1241  }
  1242  
  1243  // result is the default implementation for CassandraResourcesMigrateCassandraTableToManualThroughputFuture.Result.
  1244  func (future *CassandraResourcesMigrateCassandraTableToManualThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1245  	var done bool
  1246  	done, err = future.DoneWithContext(context.Background(), client)
  1247  	if err != nil {
  1248  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  1249  		return
  1250  	}
  1251  	if !done {
  1252  		tsgr.Response.Response = future.Response()
  1253  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture")
  1254  		return
  1255  	}
  1256  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1257  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1258  		tsgr, err = client.MigrateCassandraTableToManualThroughputResponder(tsgr.Response.Response)
  1259  		if err != nil {
  1260  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesMigrateCassandraTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1261  		}
  1262  	}
  1263  	return
  1264  }
  1265  
  1266  // CassandraResourcesUpdateCassandraKeyspaceThroughputFuture an abstraction for monitoring and retrieving
  1267  // the results of a long-running operation.
  1268  type CassandraResourcesUpdateCassandraKeyspaceThroughputFuture struct {
  1269  	azure.FutureAPI
  1270  	// Result returns the result of the asynchronous operation.
  1271  	// If the operation has not completed it will return an error.
  1272  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1273  }
  1274  
  1275  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1276  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) UnmarshalJSON(body []byte) error {
  1277  	var azFuture azure.Future
  1278  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1279  		return err
  1280  	}
  1281  	future.FutureAPI = &azFuture
  1282  	future.Result = future.result
  1283  	return nil
  1284  }
  1285  
  1286  // result is the default implementation for CassandraResourcesUpdateCassandraKeyspaceThroughputFuture.Result.
  1287  func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1288  	var done bool
  1289  	done, err = future.DoneWithContext(context.Background(), client)
  1290  	if err != nil {
  1291  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", future.Response(), "Polling failure")
  1292  		return
  1293  	}
  1294  	if !done {
  1295  		tsgr.Response.Response = future.Response()
  1296  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture")
  1297  		return
  1298  	}
  1299  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1300  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1301  		tsgr, err = client.UpdateCassandraKeyspaceThroughputResponder(tsgr.Response.Response)
  1302  		if err != nil {
  1303  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1304  		}
  1305  	}
  1306  	return
  1307  }
  1308  
  1309  // CassandraResourcesUpdateCassandraTableThroughputFuture an abstraction for monitoring and retrieving the
  1310  // results of a long-running operation.
  1311  type CassandraResourcesUpdateCassandraTableThroughputFuture struct {
  1312  	azure.FutureAPI
  1313  	// Result returns the result of the asynchronous operation.
  1314  	// If the operation has not completed it will return an error.
  1315  	Result func(CassandraResourcesClient) (ThroughputSettingsGetResults, error)
  1316  }
  1317  
  1318  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1319  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) UnmarshalJSON(body []byte) error {
  1320  	var azFuture azure.Future
  1321  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1322  		return err
  1323  	}
  1324  	future.FutureAPI = &azFuture
  1325  	future.Result = future.result
  1326  	return nil
  1327  }
  1328  
  1329  // result is the default implementation for CassandraResourcesUpdateCassandraTableThroughputFuture.Result.
  1330  func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  1331  	var done bool
  1332  	done, err = future.DoneWithContext(context.Background(), client)
  1333  	if err != nil {
  1334  		err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", future.Response(), "Polling failure")
  1335  		return
  1336  	}
  1337  	if !done {
  1338  		tsgr.Response.Response = future.Response()
  1339  		err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture")
  1340  		return
  1341  	}
  1342  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1343  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  1344  		tsgr, err = client.UpdateCassandraTableThroughputResponder(tsgr.Response.Response)
  1345  		if err != nil {
  1346  			err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  1347  		}
  1348  	}
  1349  	return
  1350  }
  1351  
  1352  // CassandraSchema cosmos DB Cassandra table schema
  1353  type CassandraSchema struct {
  1354  	// Columns - List of Cassandra table columns.
  1355  	Columns *[]Column `json:"columns,omitempty"`
  1356  	// PartitionKeys - List of partition key.
  1357  	PartitionKeys *[]CassandraPartitionKey `json:"partitionKeys,omitempty"`
  1358  	// ClusterKeys - List of cluster key.
  1359  	ClusterKeys *[]ClusterKey `json:"clusterKeys,omitempty"`
  1360  }
  1361  
  1362  // CassandraTableCreateUpdateParameters parameters to create and update Cosmos DB Cassandra table.
  1363  type CassandraTableCreateUpdateParameters struct {
  1364  	// CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
  1365  	*CassandraTableCreateUpdateProperties `json:"properties,omitempty"`
  1366  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1367  	ID *string `json:"id,omitempty"`
  1368  	// Name - READ-ONLY; The name of the ARM resource.
  1369  	Name *string `json:"name,omitempty"`
  1370  	// Type - READ-ONLY; The type of Azure resource.
  1371  	Type *string `json:"type,omitempty"`
  1372  	// Location - The location of the resource group to which the resource belongs.
  1373  	Location *string            `json:"location,omitempty"`
  1374  	Tags     map[string]*string `json:"tags"`
  1375  }
  1376  
  1377  // MarshalJSON is the custom marshaler for CassandraTableCreateUpdateParameters.
  1378  func (ctcup CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  1379  	objectMap := make(map[string]interface{})
  1380  	if ctcup.CassandraTableCreateUpdateProperties != nil {
  1381  		objectMap["properties"] = ctcup.CassandraTableCreateUpdateProperties
  1382  	}
  1383  	if ctcup.Location != nil {
  1384  		objectMap["location"] = ctcup.Location
  1385  	}
  1386  	if ctcup.Tags != nil {
  1387  		objectMap["tags"] = ctcup.Tags
  1388  	}
  1389  	return json.Marshal(objectMap)
  1390  }
  1391  
  1392  // UnmarshalJSON is the custom unmarshaler for CassandraTableCreateUpdateParameters struct.
  1393  func (ctcup *CassandraTableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  1394  	var m map[string]*json.RawMessage
  1395  	err := json.Unmarshal(body, &m)
  1396  	if err != nil {
  1397  		return err
  1398  	}
  1399  	for k, v := range m {
  1400  		switch k {
  1401  		case "properties":
  1402  			if v != nil {
  1403  				var cassandraTableCreateUpdateProperties CassandraTableCreateUpdateProperties
  1404  				err = json.Unmarshal(*v, &cassandraTableCreateUpdateProperties)
  1405  				if err != nil {
  1406  					return err
  1407  				}
  1408  				ctcup.CassandraTableCreateUpdateProperties = &cassandraTableCreateUpdateProperties
  1409  			}
  1410  		case "id":
  1411  			if v != nil {
  1412  				var ID string
  1413  				err = json.Unmarshal(*v, &ID)
  1414  				if err != nil {
  1415  					return err
  1416  				}
  1417  				ctcup.ID = &ID
  1418  			}
  1419  		case "name":
  1420  			if v != nil {
  1421  				var name string
  1422  				err = json.Unmarshal(*v, &name)
  1423  				if err != nil {
  1424  					return err
  1425  				}
  1426  				ctcup.Name = &name
  1427  			}
  1428  		case "type":
  1429  			if v != nil {
  1430  				var typeVar string
  1431  				err = json.Unmarshal(*v, &typeVar)
  1432  				if err != nil {
  1433  					return err
  1434  				}
  1435  				ctcup.Type = &typeVar
  1436  			}
  1437  		case "location":
  1438  			if v != nil {
  1439  				var location string
  1440  				err = json.Unmarshal(*v, &location)
  1441  				if err != nil {
  1442  					return err
  1443  				}
  1444  				ctcup.Location = &location
  1445  			}
  1446  		case "tags":
  1447  			if v != nil {
  1448  				var tags map[string]*string
  1449  				err = json.Unmarshal(*v, &tags)
  1450  				if err != nil {
  1451  					return err
  1452  				}
  1453  				ctcup.Tags = tags
  1454  			}
  1455  		}
  1456  	}
  1457  
  1458  	return nil
  1459  }
  1460  
  1461  // CassandraTableCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra table.
  1462  type CassandraTableCreateUpdateProperties struct {
  1463  	// Resource - The standard JSON format of a Cassandra table
  1464  	Resource *CassandraTableResource `json:"resource,omitempty"`
  1465  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  1466  	Options *CreateUpdateOptions `json:"options,omitempty"`
  1467  }
  1468  
  1469  // CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table
  1470  type CassandraTableGetProperties struct {
  1471  	Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"`
  1472  	Options  *CassandraTableGetPropertiesOptions  `json:"options,omitempty"`
  1473  }
  1474  
  1475  // CassandraTableGetPropertiesOptions ...
  1476  type CassandraTableGetPropertiesOptions struct {
  1477  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  1478  	Throughput *int32 `json:"throughput,omitempty"`
  1479  	// AutoscaleSettings - Specifies the Autoscale settings.
  1480  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1481  }
  1482  
  1483  // CassandraTableGetPropertiesResource ...
  1484  type CassandraTableGetPropertiesResource struct {
  1485  	// ID - Name of the Cosmos DB Cassandra table
  1486  	ID *string `json:"id,omitempty"`
  1487  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1488  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1489  	// Schema - Schema of the Cosmos DB Cassandra table
  1490  	Schema *CassandraSchema `json:"schema,omitempty"`
  1491  	// AnalyticalStorageTTL - Analytical TTL.
  1492  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1493  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  1494  	Rid *string `json:"_rid,omitempty"`
  1495  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  1496  	Ts *float64 `json:"_ts,omitempty"`
  1497  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  1498  	Etag *string `json:"_etag,omitempty"`
  1499  }
  1500  
  1501  // MarshalJSON is the custom marshaler for CassandraTableGetPropertiesResource.
  1502  func (ctgp CassandraTableGetPropertiesResource) MarshalJSON() ([]byte, error) {
  1503  	objectMap := make(map[string]interface{})
  1504  	if ctgp.ID != nil {
  1505  		objectMap["id"] = ctgp.ID
  1506  	}
  1507  	if ctgp.DefaultTTL != nil {
  1508  		objectMap["defaultTtl"] = ctgp.DefaultTTL
  1509  	}
  1510  	if ctgp.Schema != nil {
  1511  		objectMap["schema"] = ctgp.Schema
  1512  	}
  1513  	if ctgp.AnalyticalStorageTTL != nil {
  1514  		objectMap["analyticalStorageTtl"] = ctgp.AnalyticalStorageTTL
  1515  	}
  1516  	return json.Marshal(objectMap)
  1517  }
  1518  
  1519  // CassandraTableGetResults an Azure Cosmos DB Cassandra table.
  1520  type CassandraTableGetResults struct {
  1521  	autorest.Response `json:"-"`
  1522  	// CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table
  1523  	*CassandraTableGetProperties `json:"properties,omitempty"`
  1524  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1525  	ID *string `json:"id,omitempty"`
  1526  	// Name - READ-ONLY; The name of the ARM resource.
  1527  	Name *string `json:"name,omitempty"`
  1528  	// Type - READ-ONLY; The type of Azure resource.
  1529  	Type *string `json:"type,omitempty"`
  1530  	// Location - The location of the resource group to which the resource belongs.
  1531  	Location *string            `json:"location,omitempty"`
  1532  	Tags     map[string]*string `json:"tags"`
  1533  }
  1534  
  1535  // MarshalJSON is the custom marshaler for CassandraTableGetResults.
  1536  func (ctgr CassandraTableGetResults) MarshalJSON() ([]byte, error) {
  1537  	objectMap := make(map[string]interface{})
  1538  	if ctgr.CassandraTableGetProperties != nil {
  1539  		objectMap["properties"] = ctgr.CassandraTableGetProperties
  1540  	}
  1541  	if ctgr.Location != nil {
  1542  		objectMap["location"] = ctgr.Location
  1543  	}
  1544  	if ctgr.Tags != nil {
  1545  		objectMap["tags"] = ctgr.Tags
  1546  	}
  1547  	return json.Marshal(objectMap)
  1548  }
  1549  
  1550  // UnmarshalJSON is the custom unmarshaler for CassandraTableGetResults struct.
  1551  func (ctgr *CassandraTableGetResults) UnmarshalJSON(body []byte) error {
  1552  	var m map[string]*json.RawMessage
  1553  	err := json.Unmarshal(body, &m)
  1554  	if err != nil {
  1555  		return err
  1556  	}
  1557  	for k, v := range m {
  1558  		switch k {
  1559  		case "properties":
  1560  			if v != nil {
  1561  				var cassandraTableGetProperties CassandraTableGetProperties
  1562  				err = json.Unmarshal(*v, &cassandraTableGetProperties)
  1563  				if err != nil {
  1564  					return err
  1565  				}
  1566  				ctgr.CassandraTableGetProperties = &cassandraTableGetProperties
  1567  			}
  1568  		case "id":
  1569  			if v != nil {
  1570  				var ID string
  1571  				err = json.Unmarshal(*v, &ID)
  1572  				if err != nil {
  1573  					return err
  1574  				}
  1575  				ctgr.ID = &ID
  1576  			}
  1577  		case "name":
  1578  			if v != nil {
  1579  				var name string
  1580  				err = json.Unmarshal(*v, &name)
  1581  				if err != nil {
  1582  					return err
  1583  				}
  1584  				ctgr.Name = &name
  1585  			}
  1586  		case "type":
  1587  			if v != nil {
  1588  				var typeVar string
  1589  				err = json.Unmarshal(*v, &typeVar)
  1590  				if err != nil {
  1591  					return err
  1592  				}
  1593  				ctgr.Type = &typeVar
  1594  			}
  1595  		case "location":
  1596  			if v != nil {
  1597  				var location string
  1598  				err = json.Unmarshal(*v, &location)
  1599  				if err != nil {
  1600  					return err
  1601  				}
  1602  				ctgr.Location = &location
  1603  			}
  1604  		case "tags":
  1605  			if v != nil {
  1606  				var tags map[string]*string
  1607  				err = json.Unmarshal(*v, &tags)
  1608  				if err != nil {
  1609  					return err
  1610  				}
  1611  				ctgr.Tags = tags
  1612  			}
  1613  		}
  1614  	}
  1615  
  1616  	return nil
  1617  }
  1618  
  1619  // CassandraTableListResult the List operation response, that contains the Cassandra tables and their
  1620  // properties.
  1621  type CassandraTableListResult struct {
  1622  	autorest.Response `json:"-"`
  1623  	// Value - READ-ONLY; List of Cassandra tables and their properties.
  1624  	Value *[]CassandraTableGetResults `json:"value,omitempty"`
  1625  }
  1626  
  1627  // MarshalJSON is the custom marshaler for CassandraTableListResult.
  1628  func (ctlr CassandraTableListResult) MarshalJSON() ([]byte, error) {
  1629  	objectMap := make(map[string]interface{})
  1630  	return json.Marshal(objectMap)
  1631  }
  1632  
  1633  // CassandraTableResource cosmos DB Cassandra table resource object
  1634  type CassandraTableResource struct {
  1635  	// ID - Name of the Cosmos DB Cassandra table
  1636  	ID *string `json:"id,omitempty"`
  1637  	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
  1638  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  1639  	// Schema - Schema of the Cosmos DB Cassandra table
  1640  	Schema *CassandraSchema `json:"schema,omitempty"`
  1641  	// AnalyticalStorageTTL - Analytical TTL.
  1642  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  1643  }
  1644  
  1645  // Certificate ...
  1646  type Certificate struct {
  1647  	// Pem - PEM formatted public key.
  1648  	Pem *string `json:"pem,omitempty"`
  1649  }
  1650  
  1651  // CloudError an error response from the service.
  1652  type CloudError struct {
  1653  	Error *ErrorResponse `json:"error,omitempty"`
  1654  }
  1655  
  1656  // ClusterKey cosmos DB Cassandra table cluster key
  1657  type ClusterKey struct {
  1658  	// Name - Name of the Cosmos DB Cassandra table cluster key
  1659  	Name *string `json:"name,omitempty"`
  1660  	// OrderBy - Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc"
  1661  	OrderBy *string `json:"orderBy,omitempty"`
  1662  }
  1663  
  1664  // ClusterResource representation of a managed Cassandra cluster.
  1665  type ClusterResource struct {
  1666  	autorest.Response `json:"-"`
  1667  	// Properties - Properties of a managed Cassandra cluster.
  1668  	Properties *ClusterResourceProperties `json:"properties,omitempty"`
  1669  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  1670  	ID *string `json:"id,omitempty"`
  1671  	// Name - READ-ONLY; The name of the ARM resource.
  1672  	Name *string `json:"name,omitempty"`
  1673  	// Type - READ-ONLY; The type of Azure resource.
  1674  	Type *string `json:"type,omitempty"`
  1675  	// Location - The location of the resource group to which the resource belongs.
  1676  	Location *string                                 `json:"location,omitempty"`
  1677  	Tags     map[string]*string                      `json:"tags"`
  1678  	Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"`
  1679  }
  1680  
  1681  // MarshalJSON is the custom marshaler for ClusterResource.
  1682  func (cr ClusterResource) MarshalJSON() ([]byte, error) {
  1683  	objectMap := make(map[string]interface{})
  1684  	if cr.Properties != nil {
  1685  		objectMap["properties"] = cr.Properties
  1686  	}
  1687  	if cr.Location != nil {
  1688  		objectMap["location"] = cr.Location
  1689  	}
  1690  	if cr.Tags != nil {
  1691  		objectMap["tags"] = cr.Tags
  1692  	}
  1693  	if cr.Identity != nil {
  1694  		objectMap["identity"] = cr.Identity
  1695  	}
  1696  	return json.Marshal(objectMap)
  1697  }
  1698  
  1699  // ClusterResourceProperties properties of a managed Cassandra cluster.
  1700  type ClusterResourceProperties struct {
  1701  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  1702  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  1703  	// 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.
  1704  	RestoreFromBackupID *string `json:"restoreFromBackupId,omitempty"`
  1705  	// 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>'
  1706  	DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty"`
  1707  	// 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.
  1708  	CassandraVersion *string `json:"cassandraVersion,omitempty"`
  1709  	// 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.
  1710  	ClusterNameOverride *string `json:"clusterNameOverride,omitempty"`
  1711  	// 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'
  1712  	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
  1713  	// 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'.
  1714  	InitialCassandraAdminPassword *string `json:"initialCassandraAdminPassword,omitempty"`
  1715  	// PrometheusEndpoint - Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached.
  1716  	PrometheusEndpoint *SeedNode `json:"prometheusEndpoint,omitempty"`
  1717  	// 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.
  1718  	RepairEnabled *bool `json:"repairEnabled,omitempty"`
  1719  	// 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.
  1720  	ClientCertificates *[]Certificate `json:"clientCertificates,omitempty"`
  1721  	// 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.
  1722  	ExternalGossipCertificates *[]Certificate `json:"externalGossipCertificates,omitempty"`
  1723  	// 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.
  1724  	GossipCertificates *[]Certificate `json:"gossipCertificates,omitempty"`
  1725  	// 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.
  1726  	ExternalSeedNodes *[]SeedNode `json:"externalSeedNodes,omitempty"`
  1727  	// 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.
  1728  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  1729  	// HoursBetweenBackups - Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0.
  1730  	HoursBetweenBackups *int32 `json:"hoursBetweenBackups,omitempty"`
  1731  	// Deallocated - Whether the cluster and associated data centers has been deallocated.
  1732  	Deallocated *bool `json:"deallocated,omitempty"`
  1733  	// CassandraAuditLoggingEnabled - Whether Cassandra audit logging is enabled
  1734  	CassandraAuditLoggingEnabled *bool `json:"cassandraAuditLoggingEnabled,omitempty"`
  1735  }
  1736  
  1737  // MarshalJSON is the custom marshaler for ClusterResourceProperties.
  1738  func (cr ClusterResourceProperties) MarshalJSON() ([]byte, error) {
  1739  	objectMap := make(map[string]interface{})
  1740  	if cr.ProvisioningState != "" {
  1741  		objectMap["provisioningState"] = cr.ProvisioningState
  1742  	}
  1743  	if cr.RestoreFromBackupID != nil {
  1744  		objectMap["restoreFromBackupId"] = cr.RestoreFromBackupID
  1745  	}
  1746  	if cr.DelegatedManagementSubnetID != nil {
  1747  		objectMap["delegatedManagementSubnetId"] = cr.DelegatedManagementSubnetID
  1748  	}
  1749  	if cr.CassandraVersion != nil {
  1750  		objectMap["cassandraVersion"] = cr.CassandraVersion
  1751  	}
  1752  	if cr.ClusterNameOverride != nil {
  1753  		objectMap["clusterNameOverride"] = cr.ClusterNameOverride
  1754  	}
  1755  	if cr.AuthenticationMethod != "" {
  1756  		objectMap["authenticationMethod"] = cr.AuthenticationMethod
  1757  	}
  1758  	if cr.InitialCassandraAdminPassword != nil {
  1759  		objectMap["initialCassandraAdminPassword"] = cr.InitialCassandraAdminPassword
  1760  	}
  1761  	if cr.PrometheusEndpoint != nil {
  1762  		objectMap["prometheusEndpoint"] = cr.PrometheusEndpoint
  1763  	}
  1764  	if cr.RepairEnabled != nil {
  1765  		objectMap["repairEnabled"] = cr.RepairEnabled
  1766  	}
  1767  	if cr.ClientCertificates != nil {
  1768  		objectMap["clientCertificates"] = cr.ClientCertificates
  1769  	}
  1770  	if cr.ExternalGossipCertificates != nil {
  1771  		objectMap["externalGossipCertificates"] = cr.ExternalGossipCertificates
  1772  	}
  1773  	if cr.ExternalSeedNodes != nil {
  1774  		objectMap["externalSeedNodes"] = cr.ExternalSeedNodes
  1775  	}
  1776  	if cr.HoursBetweenBackups != nil {
  1777  		objectMap["hoursBetweenBackups"] = cr.HoursBetweenBackups
  1778  	}
  1779  	if cr.Deallocated != nil {
  1780  		objectMap["deallocated"] = cr.Deallocated
  1781  	}
  1782  	if cr.CassandraAuditLoggingEnabled != nil {
  1783  		objectMap["cassandraAuditLoggingEnabled"] = cr.CassandraAuditLoggingEnabled
  1784  	}
  1785  	return json.Marshal(objectMap)
  1786  }
  1787  
  1788  // Column cosmos DB Cassandra table column
  1789  type Column struct {
  1790  	// Name - Name of the Cosmos DB Cassandra table column
  1791  	Name *string `json:"name,omitempty"`
  1792  	// Type - Type of the Cosmos DB Cassandra table column
  1793  	Type *string `json:"type,omitempty"`
  1794  }
  1795  
  1796  // CommandOutput response of /command api
  1797  type CommandOutput struct {
  1798  	autorest.Response `json:"-"`
  1799  	// CommandOutput - Output of the command.
  1800  	CommandOutput *string `json:"commandOutput,omitempty"`
  1801  }
  1802  
  1803  // CommandPostBody specification of which command to run where
  1804  type CommandPostBody struct {
  1805  	// Command - The command which should be run
  1806  	Command *string `json:"command,omitempty"`
  1807  	// Arguments - The arguments for the command to be run
  1808  	Arguments map[string]*string `json:"arguments"`
  1809  	// Host - IP address of the cassandra host to run the command on
  1810  	Host *string `json:"host,omitempty"`
  1811  	// CassandraStopStart - If true, stops cassandra before executing the command and then start it again
  1812  	CassandraStopStart *bool `json:"cassandra-stop-start,omitempty"`
  1813  	// Readwrite - If true, allows the command to *write* to the cassandra directory, otherwise read-only.
  1814  	Readwrite *bool `json:"readwrite,omitempty"`
  1815  }
  1816  
  1817  // MarshalJSON is the custom marshaler for CommandPostBody.
  1818  func (cpb CommandPostBody) MarshalJSON() ([]byte, error) {
  1819  	objectMap := make(map[string]interface{})
  1820  	if cpb.Command != nil {
  1821  		objectMap["command"] = cpb.Command
  1822  	}
  1823  	if cpb.Arguments != nil {
  1824  		objectMap["arguments"] = cpb.Arguments
  1825  	}
  1826  	if cpb.Host != nil {
  1827  		objectMap["host"] = cpb.Host
  1828  	}
  1829  	if cpb.CassandraStopStart != nil {
  1830  		objectMap["cassandra-stop-start"] = cpb.CassandraStopStart
  1831  	}
  1832  	if cpb.Readwrite != nil {
  1833  		objectMap["readwrite"] = cpb.Readwrite
  1834  	}
  1835  	return json.Marshal(objectMap)
  1836  }
  1837  
  1838  // CompositePath ...
  1839  type CompositePath struct {
  1840  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  1841  	Path *string `json:"path,omitempty"`
  1842  	// Order - Sort order for composite paths. Possible values include: 'CompositePathSortOrderAscending', 'CompositePathSortOrderDescending'
  1843  	Order CompositePathSortOrder `json:"order,omitempty"`
  1844  }
  1845  
  1846  // ConflictResolutionPolicy the conflict resolution policy for the container.
  1847  type ConflictResolutionPolicy struct {
  1848  	// Mode - Indicates the conflict resolution mode. Possible values include: 'ConflictResolutionModeLastWriterWins', 'ConflictResolutionModeCustom'
  1849  	Mode ConflictResolutionMode `json:"mode,omitempty"`
  1850  	// ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode.
  1851  	ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"`
  1852  	// ConflictResolutionProcedure - The procedure to resolve conflicts in the case of custom mode.
  1853  	ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"`
  1854  }
  1855  
  1856  // ConnectionError ...
  1857  type ConnectionError struct {
  1858  	// ConnectionState - The kind of connection error that occurred. Possible values include: 'ConnectionStateUnknown', 'ConnectionStateOK', 'ConnectionStateOperatorToDataCenterNetworkError', 'ConnectionStateDatacenterToDatacenterNetworkError', 'ConnectionStateInternalOperatorToDataCenterCertificateError', 'ConnectionStateInternalError'
  1859  	ConnectionState ConnectionState `json:"connectionState,omitempty"`
  1860  	// IPFrom - The IP of host that originated the failed connection.
  1861  	IPFrom *string `json:"iPFrom,omitempty"`
  1862  	// IPTo - The IP that the connection attempted to reach.
  1863  	IPTo *string `json:"iPTo,omitempty"`
  1864  	// Port - The TCP port the connection was attempted on.
  1865  	Port *int32 `json:"port,omitempty"`
  1866  	// Exception - Detailed error message about the failed connection.
  1867  	Exception *string `json:"exception,omitempty"`
  1868  }
  1869  
  1870  // ConsistencyPolicy the consistency policy for the Cosmos DB database account.
  1871  type ConsistencyPolicy struct {
  1872  	// DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'DefaultConsistencyLevelEventual', 'DefaultConsistencyLevelSession', 'DefaultConsistencyLevelBoundedStaleness', 'DefaultConsistencyLevelStrong', 'DefaultConsistencyLevelConsistentPrefix'
  1873  	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
  1874  	// 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'.
  1875  	MaxStalenessPrefix *int64 `json:"maxStalenessPrefix,omitempty"`
  1876  	// 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'.
  1877  	MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"`
  1878  }
  1879  
  1880  // ContainerPartitionKey the configuration of the partition key to be used for partitioning data into
  1881  // multiple partitions
  1882  type ContainerPartitionKey struct {
  1883  	// Paths - List of paths using which data within the container can be partitioned
  1884  	Paths *[]string `json:"paths,omitempty"`
  1885  	// 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'
  1886  	Kind PartitionKind `json:"kind,omitempty"`
  1887  	// Version - Indicates the version of the partition key definition
  1888  	Version *int32 `json:"version,omitempty"`
  1889  	// SystemKey - READ-ONLY; Indicates if the container is using a system generated partition key
  1890  	SystemKey *bool `json:"systemKey,omitempty"`
  1891  }
  1892  
  1893  // MarshalJSON is the custom marshaler for ContainerPartitionKey.
  1894  func (cpk ContainerPartitionKey) MarshalJSON() ([]byte, error) {
  1895  	objectMap := make(map[string]interface{})
  1896  	if cpk.Paths != nil {
  1897  		objectMap["paths"] = cpk.Paths
  1898  	}
  1899  	if cpk.Kind != "" {
  1900  		objectMap["kind"] = cpk.Kind
  1901  	}
  1902  	if cpk.Version != nil {
  1903  		objectMap["version"] = cpk.Version
  1904  	}
  1905  	return json.Marshal(objectMap)
  1906  }
  1907  
  1908  // ContinuousBackupInformation information about the status of continuous backups.
  1909  type ContinuousBackupInformation struct {
  1910  	// LatestRestorableTimestamp - The latest restorable timestamp for a resource.
  1911  	LatestRestorableTimestamp *string `json:"latestRestorableTimestamp,omitempty"`
  1912  }
  1913  
  1914  // ContinuousBackupRestoreLocation properties of the regional restorable account.
  1915  type ContinuousBackupRestoreLocation struct {
  1916  	// Location - The name of the continuous backup restore location.
  1917  	Location *string `json:"location,omitempty"`
  1918  }
  1919  
  1920  // ContinuousModeBackupPolicy the object representing continuous mode backup policy.
  1921  type ContinuousModeBackupPolicy struct {
  1922  	// MigrationState - The object representing the state of the migration between the backup policies.
  1923  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
  1924  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  1925  	Type Type `json:"type,omitempty"`
  1926  }
  1927  
  1928  // MarshalJSON is the custom marshaler for ContinuousModeBackupPolicy.
  1929  func (cmbp ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) {
  1930  	cmbp.Type = TypeContinuous
  1931  	objectMap := make(map[string]interface{})
  1932  	if cmbp.MigrationState != nil {
  1933  		objectMap["migrationState"] = cmbp.MigrationState
  1934  	}
  1935  	if cmbp.Type != "" {
  1936  		objectMap["type"] = cmbp.Type
  1937  	}
  1938  	return json.Marshal(objectMap)
  1939  }
  1940  
  1941  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1942  func (cmbp ContinuousModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  1943  	return nil, false
  1944  }
  1945  
  1946  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1947  func (cmbp ContinuousModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  1948  	return &cmbp, true
  1949  }
  1950  
  1951  // AsBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1952  func (cmbp ContinuousModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  1953  	return nil, false
  1954  }
  1955  
  1956  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for ContinuousModeBackupPolicy.
  1957  func (cmbp ContinuousModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  1958  	return &cmbp, true
  1959  }
  1960  
  1961  // CorsPolicy the CORS policy for the Cosmos DB database account.
  1962  type CorsPolicy struct {
  1963  	// AllowedOrigins - The origin domains that are permitted to make a request against the service via CORS.
  1964  	AllowedOrigins *string `json:"allowedOrigins,omitempty"`
  1965  	// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request.
  1966  	AllowedMethods *string `json:"allowedMethods,omitempty"`
  1967  	// AllowedHeaders - The request headers that the origin domain may specify on the CORS request.
  1968  	AllowedHeaders *string `json:"allowedHeaders,omitempty"`
  1969  	// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
  1970  	ExposedHeaders *string `json:"exposedHeaders,omitempty"`
  1971  	// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
  1972  	MaxAgeInSeconds *int64 `json:"maxAgeInSeconds,omitempty"`
  1973  }
  1974  
  1975  // CreateUpdateOptions createUpdateOptions are a list of key-value pairs that describe the resource.
  1976  // Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput"
  1977  type CreateUpdateOptions struct {
  1978  	// Throughput - Request Units per second. For example, "throughput": 10000.
  1979  	Throughput *int32 `json:"throughput,omitempty"`
  1980  	// AutoscaleSettings - Specifies the Autoscale settings.
  1981  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  1982  }
  1983  
  1984  // DatabaseAccountConnectionString connection string for the Cosmos DB account
  1985  type DatabaseAccountConnectionString struct {
  1986  	// ConnectionString - READ-ONLY; Value of the connection string
  1987  	ConnectionString *string `json:"connectionString,omitempty"`
  1988  	// Description - READ-ONLY; Description of the connection string
  1989  	Description *string `json:"description,omitempty"`
  1990  }
  1991  
  1992  // MarshalJSON is the custom marshaler for DatabaseAccountConnectionString.
  1993  func (dacs DatabaseAccountConnectionString) MarshalJSON() ([]byte, error) {
  1994  	objectMap := make(map[string]interface{})
  1995  	return json.Marshal(objectMap)
  1996  }
  1997  
  1998  // DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts.
  1999  type DatabaseAccountCreateUpdateParameters struct {
  2000  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  2001  	Kind                                   DatabaseAccountKind     `json:"kind,omitempty"`
  2002  	Identity                               *ManagedServiceIdentity `json:"identity,omitempty"`
  2003  	*DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
  2004  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  2005  	ID *string `json:"id,omitempty"`
  2006  	// Name - READ-ONLY; The name of the ARM resource.
  2007  	Name *string `json:"name,omitempty"`
  2008  	// Type - READ-ONLY; The type of Azure resource.
  2009  	Type *string `json:"type,omitempty"`
  2010  	// Location - The location of the resource group to which the resource belongs.
  2011  	Location *string            `json:"location,omitempty"`
  2012  	Tags     map[string]*string `json:"tags"`
  2013  }
  2014  
  2015  // MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateParameters.
  2016  func (dacup DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  2017  	objectMap := make(map[string]interface{})
  2018  	if dacup.Kind != "" {
  2019  		objectMap["kind"] = dacup.Kind
  2020  	}
  2021  	if dacup.Identity != nil {
  2022  		objectMap["identity"] = dacup.Identity
  2023  	}
  2024  	if dacup.DatabaseAccountCreateUpdateProperties != nil {
  2025  		objectMap["properties"] = dacup.DatabaseAccountCreateUpdateProperties
  2026  	}
  2027  	if dacup.Location != nil {
  2028  		objectMap["location"] = dacup.Location
  2029  	}
  2030  	if dacup.Tags != nil {
  2031  		objectMap["tags"] = dacup.Tags
  2032  	}
  2033  	return json.Marshal(objectMap)
  2034  }
  2035  
  2036  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct.
  2037  func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  2038  	var m map[string]*json.RawMessage
  2039  	err := json.Unmarshal(body, &m)
  2040  	if err != nil {
  2041  		return err
  2042  	}
  2043  	for k, v := range m {
  2044  		switch k {
  2045  		case "kind":
  2046  			if v != nil {
  2047  				var kind DatabaseAccountKind
  2048  				err = json.Unmarshal(*v, &kind)
  2049  				if err != nil {
  2050  					return err
  2051  				}
  2052  				dacup.Kind = kind
  2053  			}
  2054  		case "identity":
  2055  			if v != nil {
  2056  				var identity ManagedServiceIdentity
  2057  				err = json.Unmarshal(*v, &identity)
  2058  				if err != nil {
  2059  					return err
  2060  				}
  2061  				dacup.Identity = &identity
  2062  			}
  2063  		case "properties":
  2064  			if v != nil {
  2065  				var databaseAccountCreateUpdateProperties DatabaseAccountCreateUpdateProperties
  2066  				err = json.Unmarshal(*v, &databaseAccountCreateUpdateProperties)
  2067  				if err != nil {
  2068  					return err
  2069  				}
  2070  				dacup.DatabaseAccountCreateUpdateProperties = &databaseAccountCreateUpdateProperties
  2071  			}
  2072  		case "id":
  2073  			if v != nil {
  2074  				var ID string
  2075  				err = json.Unmarshal(*v, &ID)
  2076  				if err != nil {
  2077  					return err
  2078  				}
  2079  				dacup.ID = &ID
  2080  			}
  2081  		case "name":
  2082  			if v != nil {
  2083  				var name string
  2084  				err = json.Unmarshal(*v, &name)
  2085  				if err != nil {
  2086  					return err
  2087  				}
  2088  				dacup.Name = &name
  2089  			}
  2090  		case "type":
  2091  			if v != nil {
  2092  				var typeVar string
  2093  				err = json.Unmarshal(*v, &typeVar)
  2094  				if err != nil {
  2095  					return err
  2096  				}
  2097  				dacup.Type = &typeVar
  2098  			}
  2099  		case "location":
  2100  			if v != nil {
  2101  				var location string
  2102  				err = json.Unmarshal(*v, &location)
  2103  				if err != nil {
  2104  					return err
  2105  				}
  2106  				dacup.Location = &location
  2107  			}
  2108  		case "tags":
  2109  			if v != nil {
  2110  				var tags map[string]*string
  2111  				err = json.Unmarshal(*v, &tags)
  2112  				if err != nil {
  2113  					return err
  2114  				}
  2115  				dacup.Tags = tags
  2116  			}
  2117  		}
  2118  	}
  2119  
  2120  	return nil
  2121  }
  2122  
  2123  // DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.
  2124  type DatabaseAccountCreateUpdateProperties struct {
  2125  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  2126  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2127  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  2128  	Locations *[]Location `json:"locations,omitempty"`
  2129  	// DatabaseAccountOfferType - The offer type for the database
  2130  	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
  2131  	// IPRules - List of IpRules.
  2132  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2133  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2134  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2135  	// 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.
  2136  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2137  	// Capabilities - List of Cosmos DB capabilities for the account
  2138  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2139  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2140  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2141  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2142  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2143  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2144  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2145  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  2146  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2147  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2148  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2149  	// KeyVaultKeyURI - The URI of the key vault
  2150  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2151  	// 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.
  2152  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2153  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  2154  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2155  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2156  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2157  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  2158  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2159  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2160  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2161  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  2162  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  2163  	// CreateMode - Enum to indicate the mode of account creation. Possible values include: 'CreateModeDefault', 'CreateModeRestore'
  2164  	CreateMode CreateMode `json:"createMode,omitempty"`
  2165  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2166  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2167  	// Cors - The CORS policy for the Cosmos DB database account.
  2168  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2169  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2170  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2171  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2172  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2173  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  2174  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  2175  	// RestoreParameters - Parameters to indicate the information about the restore.
  2176  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  2177  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  2178  	Capacity *Capacity `json:"capacity,omitempty"`
  2179  }
  2180  
  2181  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateProperties struct.
  2182  func (dacup *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(body []byte) error {
  2183  	var m map[string]*json.RawMessage
  2184  	err := json.Unmarshal(body, &m)
  2185  	if err != nil {
  2186  		return err
  2187  	}
  2188  	for k, v := range m {
  2189  		switch k {
  2190  		case "consistencyPolicy":
  2191  			if v != nil {
  2192  				var consistencyPolicy ConsistencyPolicy
  2193  				err = json.Unmarshal(*v, &consistencyPolicy)
  2194  				if err != nil {
  2195  					return err
  2196  				}
  2197  				dacup.ConsistencyPolicy = &consistencyPolicy
  2198  			}
  2199  		case "locations":
  2200  			if v != nil {
  2201  				var locations []Location
  2202  				err = json.Unmarshal(*v, &locations)
  2203  				if err != nil {
  2204  					return err
  2205  				}
  2206  				dacup.Locations = &locations
  2207  			}
  2208  		case "databaseAccountOfferType":
  2209  			if v != nil {
  2210  				var databaseAccountOfferType string
  2211  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2212  				if err != nil {
  2213  					return err
  2214  				}
  2215  				dacup.DatabaseAccountOfferType = &databaseAccountOfferType
  2216  			}
  2217  		case "ipRules":
  2218  			if v != nil {
  2219  				var IPRules []IPAddressOrRange
  2220  				err = json.Unmarshal(*v, &IPRules)
  2221  				if err != nil {
  2222  					return err
  2223  				}
  2224  				dacup.IPRules = &IPRules
  2225  			}
  2226  		case "isVirtualNetworkFilterEnabled":
  2227  			if v != nil {
  2228  				var isVirtualNetworkFilterEnabled bool
  2229  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2230  				if err != nil {
  2231  					return err
  2232  				}
  2233  				dacup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2234  			}
  2235  		case "enableAutomaticFailover":
  2236  			if v != nil {
  2237  				var enableAutomaticFailover bool
  2238  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2239  				if err != nil {
  2240  					return err
  2241  				}
  2242  				dacup.EnableAutomaticFailover = &enableAutomaticFailover
  2243  			}
  2244  		case "capabilities":
  2245  			if v != nil {
  2246  				var capabilities []Capability
  2247  				err = json.Unmarshal(*v, &capabilities)
  2248  				if err != nil {
  2249  					return err
  2250  				}
  2251  				dacup.Capabilities = &capabilities
  2252  			}
  2253  		case "virtualNetworkRules":
  2254  			if v != nil {
  2255  				var virtualNetworkRules []VirtualNetworkRule
  2256  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2257  				if err != nil {
  2258  					return err
  2259  				}
  2260  				dacup.VirtualNetworkRules = &virtualNetworkRules
  2261  			}
  2262  		case "enableMultipleWriteLocations":
  2263  			if v != nil {
  2264  				var enableMultipleWriteLocations bool
  2265  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2266  				if err != nil {
  2267  					return err
  2268  				}
  2269  				dacup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2270  			}
  2271  		case "enableCassandraConnector":
  2272  			if v != nil {
  2273  				var enableCassandraConnector bool
  2274  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2275  				if err != nil {
  2276  					return err
  2277  				}
  2278  				dacup.EnableCassandraConnector = &enableCassandraConnector
  2279  			}
  2280  		case "connectorOffer":
  2281  			if v != nil {
  2282  				var connectorOffer ConnectorOffer
  2283  				err = json.Unmarshal(*v, &connectorOffer)
  2284  				if err != nil {
  2285  					return err
  2286  				}
  2287  				dacup.ConnectorOffer = connectorOffer
  2288  			}
  2289  		case "disableKeyBasedMetadataWriteAccess":
  2290  			if v != nil {
  2291  				var disableKeyBasedMetadataWriteAccess bool
  2292  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2293  				if err != nil {
  2294  					return err
  2295  				}
  2296  				dacup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2297  			}
  2298  		case "keyVaultKeyUri":
  2299  			if v != nil {
  2300  				var keyVaultKeyURI string
  2301  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2302  				if err != nil {
  2303  					return err
  2304  				}
  2305  				dacup.KeyVaultKeyURI = &keyVaultKeyURI
  2306  			}
  2307  		case "defaultIdentity":
  2308  			if v != nil {
  2309  				var defaultIdentity string
  2310  				err = json.Unmarshal(*v, &defaultIdentity)
  2311  				if err != nil {
  2312  					return err
  2313  				}
  2314  				dacup.DefaultIdentity = &defaultIdentity
  2315  			}
  2316  		case "publicNetworkAccess":
  2317  			if v != nil {
  2318  				var publicNetworkAccess PublicNetworkAccess
  2319  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2320  				if err != nil {
  2321  					return err
  2322  				}
  2323  				dacup.PublicNetworkAccess = publicNetworkAccess
  2324  			}
  2325  		case "enableFreeTier":
  2326  			if v != nil {
  2327  				var enableFreeTier bool
  2328  				err = json.Unmarshal(*v, &enableFreeTier)
  2329  				if err != nil {
  2330  					return err
  2331  				}
  2332  				dacup.EnableFreeTier = &enableFreeTier
  2333  			}
  2334  		case "apiProperties":
  2335  			if v != nil {
  2336  				var APIProperties APIProperties
  2337  				err = json.Unmarshal(*v, &APIProperties)
  2338  				if err != nil {
  2339  					return err
  2340  				}
  2341  				dacup.APIProperties = &APIProperties
  2342  			}
  2343  		case "enableAnalyticalStorage":
  2344  			if v != nil {
  2345  				var enableAnalyticalStorage bool
  2346  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2347  				if err != nil {
  2348  					return err
  2349  				}
  2350  				dacup.EnableAnalyticalStorage = &enableAnalyticalStorage
  2351  			}
  2352  		case "analyticalStorageConfiguration":
  2353  			if v != nil {
  2354  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  2355  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  2356  				if err != nil {
  2357  					return err
  2358  				}
  2359  				dacup.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  2360  			}
  2361  		case "createMode":
  2362  			if v != nil {
  2363  				var createMode CreateMode
  2364  				err = json.Unmarshal(*v, &createMode)
  2365  				if err != nil {
  2366  					return err
  2367  				}
  2368  				dacup.CreateMode = createMode
  2369  			}
  2370  		case "backupPolicy":
  2371  			if v != nil {
  2372  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2373  				if err != nil {
  2374  					return err
  2375  				}
  2376  				dacup.BackupPolicy = backupPolicy
  2377  			}
  2378  		case "cors":
  2379  			if v != nil {
  2380  				var cors []CorsPolicy
  2381  				err = json.Unmarshal(*v, &cors)
  2382  				if err != nil {
  2383  					return err
  2384  				}
  2385  				dacup.Cors = &cors
  2386  			}
  2387  		case "networkAclBypass":
  2388  			if v != nil {
  2389  				var networkACLBypass NetworkACLBypass
  2390  				err = json.Unmarshal(*v, &networkACLBypass)
  2391  				if err != nil {
  2392  					return err
  2393  				}
  2394  				dacup.NetworkACLBypass = networkACLBypass
  2395  			}
  2396  		case "networkAclBypassResourceIds":
  2397  			if v != nil {
  2398  				var networkACLBypassResourceIds []string
  2399  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2400  				if err != nil {
  2401  					return err
  2402  				}
  2403  				dacup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2404  			}
  2405  		case "disableLocalAuth":
  2406  			if v != nil {
  2407  				var disableLocalAuth bool
  2408  				err = json.Unmarshal(*v, &disableLocalAuth)
  2409  				if err != nil {
  2410  					return err
  2411  				}
  2412  				dacup.DisableLocalAuth = &disableLocalAuth
  2413  			}
  2414  		case "restoreParameters":
  2415  			if v != nil {
  2416  				var restoreParameters RestoreParameters
  2417  				err = json.Unmarshal(*v, &restoreParameters)
  2418  				if err != nil {
  2419  					return err
  2420  				}
  2421  				dacup.RestoreParameters = &restoreParameters
  2422  			}
  2423  		case "capacity":
  2424  			if v != nil {
  2425  				var capacity Capacity
  2426  				err = json.Unmarshal(*v, &capacity)
  2427  				if err != nil {
  2428  					return err
  2429  				}
  2430  				dacup.Capacity = &capacity
  2431  			}
  2432  		}
  2433  	}
  2434  
  2435  	return nil
  2436  }
  2437  
  2438  // DatabaseAccountGetProperties properties for the database account.
  2439  type DatabaseAccountGetProperties struct {
  2440  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2441  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the Cosmos DB database account.
  2442  	DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
  2443  	// DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'DatabaseAccountOfferTypeStandard'
  2444  	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
  2445  	// IPRules - List of IpRules.
  2446  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  2447  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  2448  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  2449  	// 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.
  2450  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  2451  	// ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
  2452  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  2453  	// Capabilities - List of Cosmos DB capabilities for the account
  2454  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  2455  	// WriteLocations - READ-ONLY; An array that contains the write location for the Cosmos DB account.
  2456  	WriteLocations *[]Location `json:"writeLocations,omitempty"`
  2457  	// ReadLocations - READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account.
  2458  	ReadLocations *[]Location `json:"readLocations,omitempty"`
  2459  	// Locations - READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account.
  2460  	Locations *[]Location `json:"locations,omitempty"`
  2461  	// FailoverPolicies - READ-ONLY; An array that contains the regions ordered by their failover priorities.
  2462  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  2463  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  2464  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  2465  	// PrivateEndpointConnections - READ-ONLY; List of Private Endpoint Connections configured for the Cosmos DB account.
  2466  	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
  2467  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  2468  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  2469  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  2470  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  2471  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  2472  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  2473  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  2474  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  2475  	// KeyVaultKeyURI - The URI of the key vault
  2476  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  2477  	// 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.
  2478  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  2479  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  2480  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  2481  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  2482  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  2483  	// APIProperties - API specific properties.
  2484  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  2485  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  2486  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  2487  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  2488  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  2489  	// InstanceID - READ-ONLY; A unique identifier assigned to the database account
  2490  	InstanceID *string `json:"instanceId,omitempty"`
  2491  	// CreateMode - Enum to indicate the mode of account creation. Possible values include: 'CreateModeDefault', 'CreateModeRestore'
  2492  	CreateMode CreateMode `json:"createMode,omitempty"`
  2493  	// RestoreParameters - Parameters to indicate the information about the restore.
  2494  	RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"`
  2495  	// BackupPolicy - The object representing the policy for taking backups on an account.
  2496  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  2497  	// Cors - The CORS policy for the Cosmos DB database account.
  2498  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  2499  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  2500  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  2501  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  2502  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  2503  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  2504  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  2505  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  2506  	Capacity *Capacity `json:"capacity,omitempty"`
  2507  }
  2508  
  2509  // MarshalJSON is the custom marshaler for DatabaseAccountGetProperties.
  2510  func (dagp DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) {
  2511  	objectMap := make(map[string]interface{})
  2512  	if dagp.ProvisioningState != nil {
  2513  		objectMap["provisioningState"] = dagp.ProvisioningState
  2514  	}
  2515  	if dagp.IPRules != nil {
  2516  		objectMap["ipRules"] = dagp.IPRules
  2517  	}
  2518  	if dagp.IsVirtualNetworkFilterEnabled != nil {
  2519  		objectMap["isVirtualNetworkFilterEnabled"] = dagp.IsVirtualNetworkFilterEnabled
  2520  	}
  2521  	if dagp.EnableAutomaticFailover != nil {
  2522  		objectMap["enableAutomaticFailover"] = dagp.EnableAutomaticFailover
  2523  	}
  2524  	if dagp.ConsistencyPolicy != nil {
  2525  		objectMap["consistencyPolicy"] = dagp.ConsistencyPolicy
  2526  	}
  2527  	if dagp.Capabilities != nil {
  2528  		objectMap["capabilities"] = dagp.Capabilities
  2529  	}
  2530  	if dagp.VirtualNetworkRules != nil {
  2531  		objectMap["virtualNetworkRules"] = dagp.VirtualNetworkRules
  2532  	}
  2533  	if dagp.EnableMultipleWriteLocations != nil {
  2534  		objectMap["enableMultipleWriteLocations"] = dagp.EnableMultipleWriteLocations
  2535  	}
  2536  	if dagp.EnableCassandraConnector != nil {
  2537  		objectMap["enableCassandraConnector"] = dagp.EnableCassandraConnector
  2538  	}
  2539  	if dagp.ConnectorOffer != "" {
  2540  		objectMap["connectorOffer"] = dagp.ConnectorOffer
  2541  	}
  2542  	if dagp.DisableKeyBasedMetadataWriteAccess != nil {
  2543  		objectMap["disableKeyBasedMetadataWriteAccess"] = dagp.DisableKeyBasedMetadataWriteAccess
  2544  	}
  2545  	if dagp.KeyVaultKeyURI != nil {
  2546  		objectMap["keyVaultKeyUri"] = dagp.KeyVaultKeyURI
  2547  	}
  2548  	if dagp.DefaultIdentity != nil {
  2549  		objectMap["defaultIdentity"] = dagp.DefaultIdentity
  2550  	}
  2551  	if dagp.PublicNetworkAccess != "" {
  2552  		objectMap["publicNetworkAccess"] = dagp.PublicNetworkAccess
  2553  	}
  2554  	if dagp.EnableFreeTier != nil {
  2555  		objectMap["enableFreeTier"] = dagp.EnableFreeTier
  2556  	}
  2557  	if dagp.APIProperties != nil {
  2558  		objectMap["apiProperties"] = dagp.APIProperties
  2559  	}
  2560  	if dagp.EnableAnalyticalStorage != nil {
  2561  		objectMap["enableAnalyticalStorage"] = dagp.EnableAnalyticalStorage
  2562  	}
  2563  	if dagp.AnalyticalStorageConfiguration != nil {
  2564  		objectMap["analyticalStorageConfiguration"] = dagp.AnalyticalStorageConfiguration
  2565  	}
  2566  	if dagp.CreateMode != "" {
  2567  		objectMap["createMode"] = dagp.CreateMode
  2568  	}
  2569  	if dagp.RestoreParameters != nil {
  2570  		objectMap["restoreParameters"] = dagp.RestoreParameters
  2571  	}
  2572  	objectMap["backupPolicy"] = dagp.BackupPolicy
  2573  	if dagp.Cors != nil {
  2574  		objectMap["cors"] = dagp.Cors
  2575  	}
  2576  	if dagp.NetworkACLBypass != "" {
  2577  		objectMap["networkAclBypass"] = dagp.NetworkACLBypass
  2578  	}
  2579  	if dagp.NetworkACLBypassResourceIds != nil {
  2580  		objectMap["networkAclBypassResourceIds"] = dagp.NetworkACLBypassResourceIds
  2581  	}
  2582  	if dagp.DisableLocalAuth != nil {
  2583  		objectMap["disableLocalAuth"] = dagp.DisableLocalAuth
  2584  	}
  2585  	if dagp.Capacity != nil {
  2586  		objectMap["capacity"] = dagp.Capacity
  2587  	}
  2588  	return json.Marshal(objectMap)
  2589  }
  2590  
  2591  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetProperties struct.
  2592  func (dagp *DatabaseAccountGetProperties) UnmarshalJSON(body []byte) error {
  2593  	var m map[string]*json.RawMessage
  2594  	err := json.Unmarshal(body, &m)
  2595  	if err != nil {
  2596  		return err
  2597  	}
  2598  	for k, v := range m {
  2599  		switch k {
  2600  		case "provisioningState":
  2601  			if v != nil {
  2602  				var provisioningState string
  2603  				err = json.Unmarshal(*v, &provisioningState)
  2604  				if err != nil {
  2605  					return err
  2606  				}
  2607  				dagp.ProvisioningState = &provisioningState
  2608  			}
  2609  		case "documentEndpoint":
  2610  			if v != nil {
  2611  				var documentEndpoint string
  2612  				err = json.Unmarshal(*v, &documentEndpoint)
  2613  				if err != nil {
  2614  					return err
  2615  				}
  2616  				dagp.DocumentEndpoint = &documentEndpoint
  2617  			}
  2618  		case "databaseAccountOfferType":
  2619  			if v != nil {
  2620  				var databaseAccountOfferType DatabaseAccountOfferType
  2621  				err = json.Unmarshal(*v, &databaseAccountOfferType)
  2622  				if err != nil {
  2623  					return err
  2624  				}
  2625  				dagp.DatabaseAccountOfferType = databaseAccountOfferType
  2626  			}
  2627  		case "ipRules":
  2628  			if v != nil {
  2629  				var IPRules []IPAddressOrRange
  2630  				err = json.Unmarshal(*v, &IPRules)
  2631  				if err != nil {
  2632  					return err
  2633  				}
  2634  				dagp.IPRules = &IPRules
  2635  			}
  2636  		case "isVirtualNetworkFilterEnabled":
  2637  			if v != nil {
  2638  				var isVirtualNetworkFilterEnabled bool
  2639  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  2640  				if err != nil {
  2641  					return err
  2642  				}
  2643  				dagp.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  2644  			}
  2645  		case "enableAutomaticFailover":
  2646  			if v != nil {
  2647  				var enableAutomaticFailover bool
  2648  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  2649  				if err != nil {
  2650  					return err
  2651  				}
  2652  				dagp.EnableAutomaticFailover = &enableAutomaticFailover
  2653  			}
  2654  		case "consistencyPolicy":
  2655  			if v != nil {
  2656  				var consistencyPolicy ConsistencyPolicy
  2657  				err = json.Unmarshal(*v, &consistencyPolicy)
  2658  				if err != nil {
  2659  					return err
  2660  				}
  2661  				dagp.ConsistencyPolicy = &consistencyPolicy
  2662  			}
  2663  		case "capabilities":
  2664  			if v != nil {
  2665  				var capabilities []Capability
  2666  				err = json.Unmarshal(*v, &capabilities)
  2667  				if err != nil {
  2668  					return err
  2669  				}
  2670  				dagp.Capabilities = &capabilities
  2671  			}
  2672  		case "writeLocations":
  2673  			if v != nil {
  2674  				var writeLocations []Location
  2675  				err = json.Unmarshal(*v, &writeLocations)
  2676  				if err != nil {
  2677  					return err
  2678  				}
  2679  				dagp.WriteLocations = &writeLocations
  2680  			}
  2681  		case "readLocations":
  2682  			if v != nil {
  2683  				var readLocations []Location
  2684  				err = json.Unmarshal(*v, &readLocations)
  2685  				if err != nil {
  2686  					return err
  2687  				}
  2688  				dagp.ReadLocations = &readLocations
  2689  			}
  2690  		case "locations":
  2691  			if v != nil {
  2692  				var locations []Location
  2693  				err = json.Unmarshal(*v, &locations)
  2694  				if err != nil {
  2695  					return err
  2696  				}
  2697  				dagp.Locations = &locations
  2698  			}
  2699  		case "failoverPolicies":
  2700  			if v != nil {
  2701  				var failoverPolicies []FailoverPolicy
  2702  				err = json.Unmarshal(*v, &failoverPolicies)
  2703  				if err != nil {
  2704  					return err
  2705  				}
  2706  				dagp.FailoverPolicies = &failoverPolicies
  2707  			}
  2708  		case "virtualNetworkRules":
  2709  			if v != nil {
  2710  				var virtualNetworkRules []VirtualNetworkRule
  2711  				err = json.Unmarshal(*v, &virtualNetworkRules)
  2712  				if err != nil {
  2713  					return err
  2714  				}
  2715  				dagp.VirtualNetworkRules = &virtualNetworkRules
  2716  			}
  2717  		case "privateEndpointConnections":
  2718  			if v != nil {
  2719  				var privateEndpointConnections []PrivateEndpointConnection
  2720  				err = json.Unmarshal(*v, &privateEndpointConnections)
  2721  				if err != nil {
  2722  					return err
  2723  				}
  2724  				dagp.PrivateEndpointConnections = &privateEndpointConnections
  2725  			}
  2726  		case "enableMultipleWriteLocations":
  2727  			if v != nil {
  2728  				var enableMultipleWriteLocations bool
  2729  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  2730  				if err != nil {
  2731  					return err
  2732  				}
  2733  				dagp.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  2734  			}
  2735  		case "enableCassandraConnector":
  2736  			if v != nil {
  2737  				var enableCassandraConnector bool
  2738  				err = json.Unmarshal(*v, &enableCassandraConnector)
  2739  				if err != nil {
  2740  					return err
  2741  				}
  2742  				dagp.EnableCassandraConnector = &enableCassandraConnector
  2743  			}
  2744  		case "connectorOffer":
  2745  			if v != nil {
  2746  				var connectorOffer ConnectorOffer
  2747  				err = json.Unmarshal(*v, &connectorOffer)
  2748  				if err != nil {
  2749  					return err
  2750  				}
  2751  				dagp.ConnectorOffer = connectorOffer
  2752  			}
  2753  		case "disableKeyBasedMetadataWriteAccess":
  2754  			if v != nil {
  2755  				var disableKeyBasedMetadataWriteAccess bool
  2756  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  2757  				if err != nil {
  2758  					return err
  2759  				}
  2760  				dagp.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  2761  			}
  2762  		case "keyVaultKeyUri":
  2763  			if v != nil {
  2764  				var keyVaultKeyURI string
  2765  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  2766  				if err != nil {
  2767  					return err
  2768  				}
  2769  				dagp.KeyVaultKeyURI = &keyVaultKeyURI
  2770  			}
  2771  		case "defaultIdentity":
  2772  			if v != nil {
  2773  				var defaultIdentity string
  2774  				err = json.Unmarshal(*v, &defaultIdentity)
  2775  				if err != nil {
  2776  					return err
  2777  				}
  2778  				dagp.DefaultIdentity = &defaultIdentity
  2779  			}
  2780  		case "publicNetworkAccess":
  2781  			if v != nil {
  2782  				var publicNetworkAccess PublicNetworkAccess
  2783  				err = json.Unmarshal(*v, &publicNetworkAccess)
  2784  				if err != nil {
  2785  					return err
  2786  				}
  2787  				dagp.PublicNetworkAccess = publicNetworkAccess
  2788  			}
  2789  		case "enableFreeTier":
  2790  			if v != nil {
  2791  				var enableFreeTier bool
  2792  				err = json.Unmarshal(*v, &enableFreeTier)
  2793  				if err != nil {
  2794  					return err
  2795  				}
  2796  				dagp.EnableFreeTier = &enableFreeTier
  2797  			}
  2798  		case "apiProperties":
  2799  			if v != nil {
  2800  				var APIProperties APIProperties
  2801  				err = json.Unmarshal(*v, &APIProperties)
  2802  				if err != nil {
  2803  					return err
  2804  				}
  2805  				dagp.APIProperties = &APIProperties
  2806  			}
  2807  		case "enableAnalyticalStorage":
  2808  			if v != nil {
  2809  				var enableAnalyticalStorage bool
  2810  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  2811  				if err != nil {
  2812  					return err
  2813  				}
  2814  				dagp.EnableAnalyticalStorage = &enableAnalyticalStorage
  2815  			}
  2816  		case "analyticalStorageConfiguration":
  2817  			if v != nil {
  2818  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  2819  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  2820  				if err != nil {
  2821  					return err
  2822  				}
  2823  				dagp.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  2824  			}
  2825  		case "instanceId":
  2826  			if v != nil {
  2827  				var instanceID string
  2828  				err = json.Unmarshal(*v, &instanceID)
  2829  				if err != nil {
  2830  					return err
  2831  				}
  2832  				dagp.InstanceID = &instanceID
  2833  			}
  2834  		case "createMode":
  2835  			if v != nil {
  2836  				var createMode CreateMode
  2837  				err = json.Unmarshal(*v, &createMode)
  2838  				if err != nil {
  2839  					return err
  2840  				}
  2841  				dagp.CreateMode = createMode
  2842  			}
  2843  		case "restoreParameters":
  2844  			if v != nil {
  2845  				var restoreParameters RestoreParameters
  2846  				err = json.Unmarshal(*v, &restoreParameters)
  2847  				if err != nil {
  2848  					return err
  2849  				}
  2850  				dagp.RestoreParameters = &restoreParameters
  2851  			}
  2852  		case "backupPolicy":
  2853  			if v != nil {
  2854  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  2855  				if err != nil {
  2856  					return err
  2857  				}
  2858  				dagp.BackupPolicy = backupPolicy
  2859  			}
  2860  		case "cors":
  2861  			if v != nil {
  2862  				var cors []CorsPolicy
  2863  				err = json.Unmarshal(*v, &cors)
  2864  				if err != nil {
  2865  					return err
  2866  				}
  2867  				dagp.Cors = &cors
  2868  			}
  2869  		case "networkAclBypass":
  2870  			if v != nil {
  2871  				var networkACLBypass NetworkACLBypass
  2872  				err = json.Unmarshal(*v, &networkACLBypass)
  2873  				if err != nil {
  2874  					return err
  2875  				}
  2876  				dagp.NetworkACLBypass = networkACLBypass
  2877  			}
  2878  		case "networkAclBypassResourceIds":
  2879  			if v != nil {
  2880  				var networkACLBypassResourceIds []string
  2881  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  2882  				if err != nil {
  2883  					return err
  2884  				}
  2885  				dagp.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  2886  			}
  2887  		case "disableLocalAuth":
  2888  			if v != nil {
  2889  				var disableLocalAuth bool
  2890  				err = json.Unmarshal(*v, &disableLocalAuth)
  2891  				if err != nil {
  2892  					return err
  2893  				}
  2894  				dagp.DisableLocalAuth = &disableLocalAuth
  2895  			}
  2896  		case "capacity":
  2897  			if v != nil {
  2898  				var capacity Capacity
  2899  				err = json.Unmarshal(*v, &capacity)
  2900  				if err != nil {
  2901  					return err
  2902  				}
  2903  				dagp.Capacity = &capacity
  2904  			}
  2905  		}
  2906  	}
  2907  
  2908  	return nil
  2909  }
  2910  
  2911  // DatabaseAccountGetResults an Azure Cosmos DB database account.
  2912  type DatabaseAccountGetResults struct {
  2913  	autorest.Response `json:"-"`
  2914  	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'DatabaseAccountKindGlobalDocumentDB', 'DatabaseAccountKindMongoDB', 'DatabaseAccountKindParse'
  2915  	Kind                          DatabaseAccountKind     `json:"kind,omitempty"`
  2916  	Identity                      *ManagedServiceIdentity `json:"identity,omitempty"`
  2917  	*DatabaseAccountGetProperties `json:"properties,omitempty"`
  2918  	// SystemData - READ-ONLY; The system meta data relating to this resource.
  2919  	SystemData *SystemData `json:"systemData,omitempty"`
  2920  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  2921  	ID *string `json:"id,omitempty"`
  2922  	// Name - READ-ONLY; The name of the ARM resource.
  2923  	Name *string `json:"name,omitempty"`
  2924  	// Type - READ-ONLY; The type of Azure resource.
  2925  	Type *string `json:"type,omitempty"`
  2926  	// Location - The location of the resource group to which the resource belongs.
  2927  	Location *string            `json:"location,omitempty"`
  2928  	Tags     map[string]*string `json:"tags"`
  2929  }
  2930  
  2931  // MarshalJSON is the custom marshaler for DatabaseAccountGetResults.
  2932  func (dagr DatabaseAccountGetResults) MarshalJSON() ([]byte, error) {
  2933  	objectMap := make(map[string]interface{})
  2934  	if dagr.Kind != "" {
  2935  		objectMap["kind"] = dagr.Kind
  2936  	}
  2937  	if dagr.Identity != nil {
  2938  		objectMap["identity"] = dagr.Identity
  2939  	}
  2940  	if dagr.DatabaseAccountGetProperties != nil {
  2941  		objectMap["properties"] = dagr.DatabaseAccountGetProperties
  2942  	}
  2943  	if dagr.Location != nil {
  2944  		objectMap["location"] = dagr.Location
  2945  	}
  2946  	if dagr.Tags != nil {
  2947  		objectMap["tags"] = dagr.Tags
  2948  	}
  2949  	return json.Marshal(objectMap)
  2950  }
  2951  
  2952  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetResults struct.
  2953  func (dagr *DatabaseAccountGetResults) UnmarshalJSON(body []byte) error {
  2954  	var m map[string]*json.RawMessage
  2955  	err := json.Unmarshal(body, &m)
  2956  	if err != nil {
  2957  		return err
  2958  	}
  2959  	for k, v := range m {
  2960  		switch k {
  2961  		case "kind":
  2962  			if v != nil {
  2963  				var kind DatabaseAccountKind
  2964  				err = json.Unmarshal(*v, &kind)
  2965  				if err != nil {
  2966  					return err
  2967  				}
  2968  				dagr.Kind = kind
  2969  			}
  2970  		case "identity":
  2971  			if v != nil {
  2972  				var identity ManagedServiceIdentity
  2973  				err = json.Unmarshal(*v, &identity)
  2974  				if err != nil {
  2975  					return err
  2976  				}
  2977  				dagr.Identity = &identity
  2978  			}
  2979  		case "properties":
  2980  			if v != nil {
  2981  				var databaseAccountGetProperties DatabaseAccountGetProperties
  2982  				err = json.Unmarshal(*v, &databaseAccountGetProperties)
  2983  				if err != nil {
  2984  					return err
  2985  				}
  2986  				dagr.DatabaseAccountGetProperties = &databaseAccountGetProperties
  2987  			}
  2988  		case "systemData":
  2989  			if v != nil {
  2990  				var systemData SystemData
  2991  				err = json.Unmarshal(*v, &systemData)
  2992  				if err != nil {
  2993  					return err
  2994  				}
  2995  				dagr.SystemData = &systemData
  2996  			}
  2997  		case "id":
  2998  			if v != nil {
  2999  				var ID string
  3000  				err = json.Unmarshal(*v, &ID)
  3001  				if err != nil {
  3002  					return err
  3003  				}
  3004  				dagr.ID = &ID
  3005  			}
  3006  		case "name":
  3007  			if v != nil {
  3008  				var name string
  3009  				err = json.Unmarshal(*v, &name)
  3010  				if err != nil {
  3011  					return err
  3012  				}
  3013  				dagr.Name = &name
  3014  			}
  3015  		case "type":
  3016  			if v != nil {
  3017  				var typeVar string
  3018  				err = json.Unmarshal(*v, &typeVar)
  3019  				if err != nil {
  3020  					return err
  3021  				}
  3022  				dagr.Type = &typeVar
  3023  			}
  3024  		case "location":
  3025  			if v != nil {
  3026  				var location string
  3027  				err = json.Unmarshal(*v, &location)
  3028  				if err != nil {
  3029  					return err
  3030  				}
  3031  				dagr.Location = &location
  3032  			}
  3033  		case "tags":
  3034  			if v != nil {
  3035  				var tags map[string]*string
  3036  				err = json.Unmarshal(*v, &tags)
  3037  				if err != nil {
  3038  					return err
  3039  				}
  3040  				dagr.Tags = tags
  3041  			}
  3042  		}
  3043  	}
  3044  
  3045  	return nil
  3046  }
  3047  
  3048  // DatabaseAccountListConnectionStringsResult the connection strings for the given database account.
  3049  type DatabaseAccountListConnectionStringsResult struct {
  3050  	autorest.Response `json:"-"`
  3051  	// ConnectionStrings - An array that contains the connection strings for the Cosmos DB account.
  3052  	ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"`
  3053  }
  3054  
  3055  // DatabaseAccountListKeysResult the access keys for the given database account.
  3056  type DatabaseAccountListKeysResult struct {
  3057  	autorest.Response `json:"-"`
  3058  	// PrimaryMasterKey - READ-ONLY; Base 64 encoded value of the primary read-write key.
  3059  	PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"`
  3060  	// SecondaryMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-write key.
  3061  	SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty"`
  3062  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3063  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3064  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3065  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3066  }
  3067  
  3068  // MarshalJSON is the custom marshaler for DatabaseAccountListKeysResult.
  3069  func (dalkr DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error) {
  3070  	objectMap := make(map[string]interface{})
  3071  	return json.Marshal(objectMap)
  3072  }
  3073  
  3074  // DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account.
  3075  type DatabaseAccountListReadOnlyKeysResult struct {
  3076  	autorest.Response `json:"-"`
  3077  	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
  3078  	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
  3079  	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
  3080  	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
  3081  }
  3082  
  3083  // MarshalJSON is the custom marshaler for DatabaseAccountListReadOnlyKeysResult.
  3084  func (dalrokr DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error) {
  3085  	objectMap := make(map[string]interface{})
  3086  	return json.Marshal(objectMap)
  3087  }
  3088  
  3089  // DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account.
  3090  type DatabaseAccountRegenerateKeyParameters struct {
  3091  	// KeyKind - The access key to regenerate. Possible values include: 'KeyKindPrimary', 'KeyKindSecondary', 'KeyKindPrimaryReadonly', 'KeyKindSecondaryReadonly'
  3092  	KeyKind KeyKind `json:"keyKind,omitempty"`
  3093  }
  3094  
  3095  // DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  3096  // long-running operation.
  3097  type DatabaseAccountsCreateOrUpdateFuture struct {
  3098  	azure.FutureAPI
  3099  	// Result returns the result of the asynchronous operation.
  3100  	// If the operation has not completed it will return an error.
  3101  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3102  }
  3103  
  3104  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3105  func (future *DatabaseAccountsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  3106  	var azFuture azure.Future
  3107  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3108  		return err
  3109  	}
  3110  	future.FutureAPI = &azFuture
  3111  	future.Result = future.result
  3112  	return nil
  3113  }
  3114  
  3115  // result is the default implementation for DatabaseAccountsCreateOrUpdateFuture.Result.
  3116  func (future *DatabaseAccountsCreateOrUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3117  	var done bool
  3118  	done, err = future.DoneWithContext(context.Background(), client)
  3119  	if err != nil {
  3120  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  3121  		return
  3122  	}
  3123  	if !done {
  3124  		dagr.Response.Response = future.Response()
  3125  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
  3126  		return
  3127  	}
  3128  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3129  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3130  		dagr, err = client.CreateOrUpdateResponder(dagr.Response.Response)
  3131  		if err != nil {
  3132  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3133  		}
  3134  	}
  3135  	return
  3136  }
  3137  
  3138  // DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  3139  // operation.
  3140  type DatabaseAccountsDeleteFuture struct {
  3141  	azure.FutureAPI
  3142  	// Result returns the result of the asynchronous operation.
  3143  	// If the operation has not completed it will return an error.
  3144  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3145  }
  3146  
  3147  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3148  func (future *DatabaseAccountsDeleteFuture) UnmarshalJSON(body []byte) error {
  3149  	var azFuture azure.Future
  3150  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3151  		return err
  3152  	}
  3153  	future.FutureAPI = &azFuture
  3154  	future.Result = future.result
  3155  	return nil
  3156  }
  3157  
  3158  // result is the default implementation for DatabaseAccountsDeleteFuture.Result.
  3159  func (future *DatabaseAccountsDeleteFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3160  	var done bool
  3161  	done, err = future.DoneWithContext(context.Background(), client)
  3162  	if err != nil {
  3163  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Polling failure")
  3164  		return
  3165  	}
  3166  	if !done {
  3167  		ar.Response = future.Response()
  3168  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
  3169  		return
  3170  	}
  3171  	ar.Response = future.Response()
  3172  	return
  3173  }
  3174  
  3175  // DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of
  3176  // a long-running operation.
  3177  type DatabaseAccountsFailoverPriorityChangeFuture struct {
  3178  	azure.FutureAPI
  3179  	// Result returns the result of the asynchronous operation.
  3180  	// If the operation has not completed it will return an error.
  3181  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3182  }
  3183  
  3184  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3185  func (future *DatabaseAccountsFailoverPriorityChangeFuture) UnmarshalJSON(body []byte) error {
  3186  	var azFuture azure.Future
  3187  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3188  		return err
  3189  	}
  3190  	future.FutureAPI = &azFuture
  3191  	future.Result = future.result
  3192  	return nil
  3193  }
  3194  
  3195  // result is the default implementation for DatabaseAccountsFailoverPriorityChangeFuture.Result.
  3196  func (future *DatabaseAccountsFailoverPriorityChangeFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3197  	var done bool
  3198  	done, err = future.DoneWithContext(context.Background(), client)
  3199  	if err != nil {
  3200  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Polling failure")
  3201  		return
  3202  	}
  3203  	if !done {
  3204  		ar.Response = future.Response()
  3205  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
  3206  		return
  3207  	}
  3208  	ar.Response = future.Response()
  3209  	return
  3210  }
  3211  
  3212  // DatabaseAccountsListResult the List operation response, that contains the database accounts and their
  3213  // properties.
  3214  type DatabaseAccountsListResult struct {
  3215  	autorest.Response `json:"-"`
  3216  	// Value - READ-ONLY; List of database account and their properties.
  3217  	Value *[]DatabaseAccountGetResults `json:"value,omitempty"`
  3218  }
  3219  
  3220  // MarshalJSON is the custom marshaler for DatabaseAccountsListResult.
  3221  func (dalr DatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  3222  	objectMap := make(map[string]interface{})
  3223  	return json.Marshal(objectMap)
  3224  }
  3225  
  3226  // DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a
  3227  // long-running operation.
  3228  type DatabaseAccountsOfflineRegionFuture struct {
  3229  	azure.FutureAPI
  3230  	// Result returns the result of the asynchronous operation.
  3231  	// If the operation has not completed it will return an error.
  3232  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3233  }
  3234  
  3235  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3236  func (future *DatabaseAccountsOfflineRegionFuture) UnmarshalJSON(body []byte) error {
  3237  	var azFuture azure.Future
  3238  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3239  		return err
  3240  	}
  3241  	future.FutureAPI = &azFuture
  3242  	future.Result = future.result
  3243  	return nil
  3244  }
  3245  
  3246  // result is the default implementation for DatabaseAccountsOfflineRegionFuture.Result.
  3247  func (future *DatabaseAccountsOfflineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3248  	var done bool
  3249  	done, err = future.DoneWithContext(context.Background(), client)
  3250  	if err != nil {
  3251  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure")
  3252  		return
  3253  	}
  3254  	if !done {
  3255  		ar.Response = future.Response()
  3256  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture")
  3257  		return
  3258  	}
  3259  	ar.Response = future.Response()
  3260  	return
  3261  }
  3262  
  3263  // DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a
  3264  // long-running operation.
  3265  type DatabaseAccountsOnlineRegionFuture struct {
  3266  	azure.FutureAPI
  3267  	// Result returns the result of the asynchronous operation.
  3268  	// If the operation has not completed it will return an error.
  3269  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3270  }
  3271  
  3272  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3273  func (future *DatabaseAccountsOnlineRegionFuture) UnmarshalJSON(body []byte) error {
  3274  	var azFuture azure.Future
  3275  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3276  		return err
  3277  	}
  3278  	future.FutureAPI = &azFuture
  3279  	future.Result = future.result
  3280  	return nil
  3281  }
  3282  
  3283  // result is the default implementation for DatabaseAccountsOnlineRegionFuture.Result.
  3284  func (future *DatabaseAccountsOnlineRegionFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3285  	var done bool
  3286  	done, err = future.DoneWithContext(context.Background(), client)
  3287  	if err != nil {
  3288  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure")
  3289  		return
  3290  	}
  3291  	if !done {
  3292  		ar.Response = future.Response()
  3293  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture")
  3294  		return
  3295  	}
  3296  	ar.Response = future.Response()
  3297  	return
  3298  }
  3299  
  3300  // DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a
  3301  // long-running operation.
  3302  type DatabaseAccountsRegenerateKeyFuture struct {
  3303  	azure.FutureAPI
  3304  	// Result returns the result of the asynchronous operation.
  3305  	// If the operation has not completed it will return an error.
  3306  	Result func(DatabaseAccountsClient) (autorest.Response, error)
  3307  }
  3308  
  3309  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3310  func (future *DatabaseAccountsRegenerateKeyFuture) UnmarshalJSON(body []byte) error {
  3311  	var azFuture azure.Future
  3312  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3313  		return err
  3314  	}
  3315  	future.FutureAPI = &azFuture
  3316  	future.Result = future.result
  3317  	return nil
  3318  }
  3319  
  3320  // result is the default implementation for DatabaseAccountsRegenerateKeyFuture.Result.
  3321  func (future *DatabaseAccountsRegenerateKeyFuture) result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
  3322  	var done bool
  3323  	done, err = future.DoneWithContext(context.Background(), client)
  3324  	if err != nil {
  3325  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Polling failure")
  3326  		return
  3327  	}
  3328  	if !done {
  3329  		ar.Response = future.Response()
  3330  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
  3331  		return
  3332  	}
  3333  	ar.Response = future.Response()
  3334  	return
  3335  }
  3336  
  3337  // DatabaseAccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  3338  // operation.
  3339  type DatabaseAccountsUpdateFuture struct {
  3340  	azure.FutureAPI
  3341  	// Result returns the result of the asynchronous operation.
  3342  	// If the operation has not completed it will return an error.
  3343  	Result func(DatabaseAccountsClient) (DatabaseAccountGetResults, error)
  3344  }
  3345  
  3346  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3347  func (future *DatabaseAccountsUpdateFuture) UnmarshalJSON(body []byte) error {
  3348  	var azFuture azure.Future
  3349  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3350  		return err
  3351  	}
  3352  	future.FutureAPI = &azFuture
  3353  	future.Result = future.result
  3354  	return nil
  3355  }
  3356  
  3357  // result is the default implementation for DatabaseAccountsUpdateFuture.Result.
  3358  func (future *DatabaseAccountsUpdateFuture) result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) {
  3359  	var done bool
  3360  	done, err = future.DoneWithContext(context.Background(), client)
  3361  	if err != nil {
  3362  		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", future.Response(), "Polling failure")
  3363  		return
  3364  	}
  3365  	if !done {
  3366  		dagr.Response.Response = future.Response()
  3367  		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateFuture")
  3368  		return
  3369  	}
  3370  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3371  	if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent {
  3372  		dagr, err = client.UpdateResponder(dagr.Response.Response)
  3373  		if err != nil {
  3374  			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request")
  3375  		}
  3376  	}
  3377  	return
  3378  }
  3379  
  3380  // DatabaseAccountUpdateParameters parameters for patching Azure Cosmos DB database account properties.
  3381  type DatabaseAccountUpdateParameters struct {
  3382  	Tags map[string]*string `json:"tags"`
  3383  	// Location - The location of the resource group to which the resource belongs.
  3384  	Location                         *string                 `json:"location,omitempty"`
  3385  	Identity                         *ManagedServiceIdentity `json:"identity,omitempty"`
  3386  	*DatabaseAccountUpdateProperties `json:"properties,omitempty"`
  3387  }
  3388  
  3389  // MarshalJSON is the custom marshaler for DatabaseAccountUpdateParameters.
  3390  func (daup DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) {
  3391  	objectMap := make(map[string]interface{})
  3392  	if daup.Tags != nil {
  3393  		objectMap["tags"] = daup.Tags
  3394  	}
  3395  	if daup.Location != nil {
  3396  		objectMap["location"] = daup.Location
  3397  	}
  3398  	if daup.Identity != nil {
  3399  		objectMap["identity"] = daup.Identity
  3400  	}
  3401  	if daup.DatabaseAccountUpdateProperties != nil {
  3402  		objectMap["properties"] = daup.DatabaseAccountUpdateProperties
  3403  	}
  3404  	return json.Marshal(objectMap)
  3405  }
  3406  
  3407  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateParameters struct.
  3408  func (daup *DatabaseAccountUpdateParameters) UnmarshalJSON(body []byte) error {
  3409  	var m map[string]*json.RawMessage
  3410  	err := json.Unmarshal(body, &m)
  3411  	if err != nil {
  3412  		return err
  3413  	}
  3414  	for k, v := range m {
  3415  		switch k {
  3416  		case "tags":
  3417  			if v != nil {
  3418  				var tags map[string]*string
  3419  				err = json.Unmarshal(*v, &tags)
  3420  				if err != nil {
  3421  					return err
  3422  				}
  3423  				daup.Tags = tags
  3424  			}
  3425  		case "location":
  3426  			if v != nil {
  3427  				var location string
  3428  				err = json.Unmarshal(*v, &location)
  3429  				if err != nil {
  3430  					return err
  3431  				}
  3432  				daup.Location = &location
  3433  			}
  3434  		case "identity":
  3435  			if v != nil {
  3436  				var identity ManagedServiceIdentity
  3437  				err = json.Unmarshal(*v, &identity)
  3438  				if err != nil {
  3439  					return err
  3440  				}
  3441  				daup.Identity = &identity
  3442  			}
  3443  		case "properties":
  3444  			if v != nil {
  3445  				var databaseAccountUpdateProperties DatabaseAccountUpdateProperties
  3446  				err = json.Unmarshal(*v, &databaseAccountUpdateProperties)
  3447  				if err != nil {
  3448  					return err
  3449  				}
  3450  				daup.DatabaseAccountUpdateProperties = &databaseAccountUpdateProperties
  3451  			}
  3452  		}
  3453  	}
  3454  
  3455  	return nil
  3456  }
  3457  
  3458  // DatabaseAccountUpdateProperties properties to update Azure Cosmos DB database accounts.
  3459  type DatabaseAccountUpdateProperties struct {
  3460  	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
  3461  	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
  3462  	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
  3463  	Locations *[]Location `json:"locations,omitempty"`
  3464  	// IPRules - List of IpRules.
  3465  	IPRules *[]IPAddressOrRange `json:"ipRules,omitempty"`
  3466  	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
  3467  	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
  3468  	// 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.
  3469  	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
  3470  	// Capabilities - List of Cosmos DB capabilities for the account
  3471  	Capabilities *[]Capability `json:"capabilities,omitempty"`
  3472  	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
  3473  	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
  3474  	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
  3475  	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
  3476  	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
  3477  	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
  3478  	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'ConnectorOfferSmall'
  3479  	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
  3480  	// DisableKeyBasedMetadataWriteAccess - Disable write operations on metadata resources (databases, containers, throughput) via account keys
  3481  	DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
  3482  	// KeyVaultKeyURI - The URI of the key vault
  3483  	KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"`
  3484  	// 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.
  3485  	DefaultIdentity *string `json:"defaultIdentity,omitempty"`
  3486  	// PublicNetworkAccess - Whether requests from Public Network are allowed. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
  3487  	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
  3488  	// EnableFreeTier - Flag to indicate whether Free Tier is enabled.
  3489  	EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
  3490  	// APIProperties - API specific properties. Currently, supported only for MongoDB API.
  3491  	APIProperties *APIProperties `json:"apiProperties,omitempty"`
  3492  	// EnableAnalyticalStorage - Flag to indicate whether to enable storage analytics.
  3493  	EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
  3494  	// AnalyticalStorageConfiguration - Analytical storage specific properties.
  3495  	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
  3496  	// BackupPolicy - The object representing the policy for taking backups on an account.
  3497  	BackupPolicy BasicBackupPolicy `json:"backupPolicy,omitempty"`
  3498  	// Cors - The CORS policy for the Cosmos DB database account.
  3499  	Cors *[]CorsPolicy `json:"cors,omitempty"`
  3500  	// NetworkACLBypass - Indicates what services are allowed to bypass firewall checks. Possible values include: 'NetworkACLBypassNone', 'NetworkACLBypassAzureServices'
  3501  	NetworkACLBypass NetworkACLBypass `json:"networkAclBypass,omitempty"`
  3502  	// NetworkACLBypassResourceIds - An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
  3503  	NetworkACLBypassResourceIds *[]string `json:"networkAclBypassResourceIds,omitempty"`
  3504  	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
  3505  	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
  3506  	// Capacity - The object that represents all properties related to capacity enforcement on an account.
  3507  	Capacity *Capacity `json:"capacity,omitempty"`
  3508  }
  3509  
  3510  // UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateProperties struct.
  3511  func (daup *DatabaseAccountUpdateProperties) UnmarshalJSON(body []byte) error {
  3512  	var m map[string]*json.RawMessage
  3513  	err := json.Unmarshal(body, &m)
  3514  	if err != nil {
  3515  		return err
  3516  	}
  3517  	for k, v := range m {
  3518  		switch k {
  3519  		case "consistencyPolicy":
  3520  			if v != nil {
  3521  				var consistencyPolicy ConsistencyPolicy
  3522  				err = json.Unmarshal(*v, &consistencyPolicy)
  3523  				if err != nil {
  3524  					return err
  3525  				}
  3526  				daup.ConsistencyPolicy = &consistencyPolicy
  3527  			}
  3528  		case "locations":
  3529  			if v != nil {
  3530  				var locations []Location
  3531  				err = json.Unmarshal(*v, &locations)
  3532  				if err != nil {
  3533  					return err
  3534  				}
  3535  				daup.Locations = &locations
  3536  			}
  3537  		case "ipRules":
  3538  			if v != nil {
  3539  				var IPRules []IPAddressOrRange
  3540  				err = json.Unmarshal(*v, &IPRules)
  3541  				if err != nil {
  3542  					return err
  3543  				}
  3544  				daup.IPRules = &IPRules
  3545  			}
  3546  		case "isVirtualNetworkFilterEnabled":
  3547  			if v != nil {
  3548  				var isVirtualNetworkFilterEnabled bool
  3549  				err = json.Unmarshal(*v, &isVirtualNetworkFilterEnabled)
  3550  				if err != nil {
  3551  					return err
  3552  				}
  3553  				daup.IsVirtualNetworkFilterEnabled = &isVirtualNetworkFilterEnabled
  3554  			}
  3555  		case "enableAutomaticFailover":
  3556  			if v != nil {
  3557  				var enableAutomaticFailover bool
  3558  				err = json.Unmarshal(*v, &enableAutomaticFailover)
  3559  				if err != nil {
  3560  					return err
  3561  				}
  3562  				daup.EnableAutomaticFailover = &enableAutomaticFailover
  3563  			}
  3564  		case "capabilities":
  3565  			if v != nil {
  3566  				var capabilities []Capability
  3567  				err = json.Unmarshal(*v, &capabilities)
  3568  				if err != nil {
  3569  					return err
  3570  				}
  3571  				daup.Capabilities = &capabilities
  3572  			}
  3573  		case "virtualNetworkRules":
  3574  			if v != nil {
  3575  				var virtualNetworkRules []VirtualNetworkRule
  3576  				err = json.Unmarshal(*v, &virtualNetworkRules)
  3577  				if err != nil {
  3578  					return err
  3579  				}
  3580  				daup.VirtualNetworkRules = &virtualNetworkRules
  3581  			}
  3582  		case "enableMultipleWriteLocations":
  3583  			if v != nil {
  3584  				var enableMultipleWriteLocations bool
  3585  				err = json.Unmarshal(*v, &enableMultipleWriteLocations)
  3586  				if err != nil {
  3587  					return err
  3588  				}
  3589  				daup.EnableMultipleWriteLocations = &enableMultipleWriteLocations
  3590  			}
  3591  		case "enableCassandraConnector":
  3592  			if v != nil {
  3593  				var enableCassandraConnector bool
  3594  				err = json.Unmarshal(*v, &enableCassandraConnector)
  3595  				if err != nil {
  3596  					return err
  3597  				}
  3598  				daup.EnableCassandraConnector = &enableCassandraConnector
  3599  			}
  3600  		case "connectorOffer":
  3601  			if v != nil {
  3602  				var connectorOffer ConnectorOffer
  3603  				err = json.Unmarshal(*v, &connectorOffer)
  3604  				if err != nil {
  3605  					return err
  3606  				}
  3607  				daup.ConnectorOffer = connectorOffer
  3608  			}
  3609  		case "disableKeyBasedMetadataWriteAccess":
  3610  			if v != nil {
  3611  				var disableKeyBasedMetadataWriteAccess bool
  3612  				err = json.Unmarshal(*v, &disableKeyBasedMetadataWriteAccess)
  3613  				if err != nil {
  3614  					return err
  3615  				}
  3616  				daup.DisableKeyBasedMetadataWriteAccess = &disableKeyBasedMetadataWriteAccess
  3617  			}
  3618  		case "keyVaultKeyUri":
  3619  			if v != nil {
  3620  				var keyVaultKeyURI string
  3621  				err = json.Unmarshal(*v, &keyVaultKeyURI)
  3622  				if err != nil {
  3623  					return err
  3624  				}
  3625  				daup.KeyVaultKeyURI = &keyVaultKeyURI
  3626  			}
  3627  		case "defaultIdentity":
  3628  			if v != nil {
  3629  				var defaultIdentity string
  3630  				err = json.Unmarshal(*v, &defaultIdentity)
  3631  				if err != nil {
  3632  					return err
  3633  				}
  3634  				daup.DefaultIdentity = &defaultIdentity
  3635  			}
  3636  		case "publicNetworkAccess":
  3637  			if v != nil {
  3638  				var publicNetworkAccess PublicNetworkAccess
  3639  				err = json.Unmarshal(*v, &publicNetworkAccess)
  3640  				if err != nil {
  3641  					return err
  3642  				}
  3643  				daup.PublicNetworkAccess = publicNetworkAccess
  3644  			}
  3645  		case "enableFreeTier":
  3646  			if v != nil {
  3647  				var enableFreeTier bool
  3648  				err = json.Unmarshal(*v, &enableFreeTier)
  3649  				if err != nil {
  3650  					return err
  3651  				}
  3652  				daup.EnableFreeTier = &enableFreeTier
  3653  			}
  3654  		case "apiProperties":
  3655  			if v != nil {
  3656  				var APIProperties APIProperties
  3657  				err = json.Unmarshal(*v, &APIProperties)
  3658  				if err != nil {
  3659  					return err
  3660  				}
  3661  				daup.APIProperties = &APIProperties
  3662  			}
  3663  		case "enableAnalyticalStorage":
  3664  			if v != nil {
  3665  				var enableAnalyticalStorage bool
  3666  				err = json.Unmarshal(*v, &enableAnalyticalStorage)
  3667  				if err != nil {
  3668  					return err
  3669  				}
  3670  				daup.EnableAnalyticalStorage = &enableAnalyticalStorage
  3671  			}
  3672  		case "analyticalStorageConfiguration":
  3673  			if v != nil {
  3674  				var analyticalStorageConfiguration AnalyticalStorageConfiguration
  3675  				err = json.Unmarshal(*v, &analyticalStorageConfiguration)
  3676  				if err != nil {
  3677  					return err
  3678  				}
  3679  				daup.AnalyticalStorageConfiguration = &analyticalStorageConfiguration
  3680  			}
  3681  		case "backupPolicy":
  3682  			if v != nil {
  3683  				backupPolicy, err := unmarshalBasicBackupPolicy(*v)
  3684  				if err != nil {
  3685  					return err
  3686  				}
  3687  				daup.BackupPolicy = backupPolicy
  3688  			}
  3689  		case "cors":
  3690  			if v != nil {
  3691  				var cors []CorsPolicy
  3692  				err = json.Unmarshal(*v, &cors)
  3693  				if err != nil {
  3694  					return err
  3695  				}
  3696  				daup.Cors = &cors
  3697  			}
  3698  		case "networkAclBypass":
  3699  			if v != nil {
  3700  				var networkACLBypass NetworkACLBypass
  3701  				err = json.Unmarshal(*v, &networkACLBypass)
  3702  				if err != nil {
  3703  					return err
  3704  				}
  3705  				daup.NetworkACLBypass = networkACLBypass
  3706  			}
  3707  		case "networkAclBypassResourceIds":
  3708  			if v != nil {
  3709  				var networkACLBypassResourceIds []string
  3710  				err = json.Unmarshal(*v, &networkACLBypassResourceIds)
  3711  				if err != nil {
  3712  					return err
  3713  				}
  3714  				daup.NetworkACLBypassResourceIds = &networkACLBypassResourceIds
  3715  			}
  3716  		case "disableLocalAuth":
  3717  			if v != nil {
  3718  				var disableLocalAuth bool
  3719  				err = json.Unmarshal(*v, &disableLocalAuth)
  3720  				if err != nil {
  3721  					return err
  3722  				}
  3723  				daup.DisableLocalAuth = &disableLocalAuth
  3724  			}
  3725  		case "capacity":
  3726  			if v != nil {
  3727  				var capacity Capacity
  3728  				err = json.Unmarshal(*v, &capacity)
  3729  				if err != nil {
  3730  					return err
  3731  				}
  3732  				daup.Capacity = &capacity
  3733  			}
  3734  		}
  3735  	}
  3736  
  3737  	return nil
  3738  }
  3739  
  3740  // DatabaseRestoreResource specific Databases to restore.
  3741  type DatabaseRestoreResource struct {
  3742  	// DatabaseName - The name of the database available for restore.
  3743  	DatabaseName *string `json:"databaseName,omitempty"`
  3744  	// CollectionNames - The names of the collections available for restore.
  3745  	CollectionNames *[]string `json:"collectionNames,omitempty"`
  3746  }
  3747  
  3748  // DataCenterResource a managed Cassandra data center.
  3749  type DataCenterResource struct {
  3750  	autorest.Response `json:"-"`
  3751  	// Properties - Properties of a managed Cassandra data center.
  3752  	Properties *DataCenterResourceProperties `json:"properties,omitempty"`
  3753  	// ID - READ-ONLY; The unique resource identifier of the database account.
  3754  	ID *string `json:"id,omitempty"`
  3755  	// Name - READ-ONLY; The name of the database account.
  3756  	Name *string `json:"name,omitempty"`
  3757  	// Type - READ-ONLY; The type of Azure resource.
  3758  	Type *string `json:"type,omitempty"`
  3759  }
  3760  
  3761  // MarshalJSON is the custom marshaler for DataCenterResource.
  3762  func (dcr DataCenterResource) MarshalJSON() ([]byte, error) {
  3763  	objectMap := make(map[string]interface{})
  3764  	if dcr.Properties != nil {
  3765  		objectMap["properties"] = dcr.Properties
  3766  	}
  3767  	return json.Marshal(objectMap)
  3768  }
  3769  
  3770  // DataCenterResourceProperties properties of a managed Cassandra data center.
  3771  type DataCenterResourceProperties struct {
  3772  	// ProvisioningState - Possible values include: 'ManagedCassandraProvisioningStateCreating', 'ManagedCassandraProvisioningStateUpdating', 'ManagedCassandraProvisioningStateDeleting', 'ManagedCassandraProvisioningStateSucceeded', 'ManagedCassandraProvisioningStateFailed', 'ManagedCassandraProvisioningStateCanceled'
  3773  	ProvisioningState ManagedCassandraProvisioningState `json:"provisioningState,omitempty"`
  3774  	// DataCenterLocation - The region this data center should be created in.
  3775  	DataCenterLocation *string `json:"dataCenterLocation,omitempty"`
  3776  	// 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>'.
  3777  	DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty"`
  3778  	// 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.
  3779  	NodeCount *int32 `json:"nodeCount,omitempty"`
  3780  	// 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.
  3781  	SeedNodes *[]SeedNode `json:"seedNodes,omitempty"`
  3782  	// 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.
  3783  	Base64EncodedCassandraYamlFragment *string `json:"base64EncodedCassandraYamlFragment,omitempty"`
  3784  	// 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.
  3785  	ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty"`
  3786  	// BackupStorageCustomerKeyURI - Indicates the Key Uri of the customer key to use for encryption of the backup storage account.
  3787  	BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty"`
  3788  	// Sku - Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2
  3789  	Sku *string `json:"sku,omitempty"`
  3790  	// DiskSku - Disk SKU used for data centers. Default value is P30.
  3791  	DiskSku *string `json:"diskSku,omitempty"`
  3792  	// DiskCapacity - Number of disk used for data centers. Default value is 4.
  3793  	DiskCapacity *int32 `json:"diskCapacity,omitempty"`
  3794  	// 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.
  3795  	AvailabilityZone *bool `json:"availabilityZone,omitempty"`
  3796  }
  3797  
  3798  // MarshalJSON is the custom marshaler for DataCenterResourceProperties.
  3799  func (dcr DataCenterResourceProperties) MarshalJSON() ([]byte, error) {
  3800  	objectMap := make(map[string]interface{})
  3801  	if dcr.ProvisioningState != "" {
  3802  		objectMap["provisioningState"] = dcr.ProvisioningState
  3803  	}
  3804  	if dcr.DataCenterLocation != nil {
  3805  		objectMap["dataCenterLocation"] = dcr.DataCenterLocation
  3806  	}
  3807  	if dcr.DelegatedSubnetID != nil {
  3808  		objectMap["delegatedSubnetId"] = dcr.DelegatedSubnetID
  3809  	}
  3810  	if dcr.NodeCount != nil {
  3811  		objectMap["nodeCount"] = dcr.NodeCount
  3812  	}
  3813  	if dcr.Base64EncodedCassandraYamlFragment != nil {
  3814  		objectMap["base64EncodedCassandraYamlFragment"] = dcr.Base64EncodedCassandraYamlFragment
  3815  	}
  3816  	if dcr.ManagedDiskCustomerKeyURI != nil {
  3817  		objectMap["managedDiskCustomerKeyUri"] = dcr.ManagedDiskCustomerKeyURI
  3818  	}
  3819  	if dcr.BackupStorageCustomerKeyURI != nil {
  3820  		objectMap["backupStorageCustomerKeyUri"] = dcr.BackupStorageCustomerKeyURI
  3821  	}
  3822  	if dcr.Sku != nil {
  3823  		objectMap["sku"] = dcr.Sku
  3824  	}
  3825  	if dcr.DiskSku != nil {
  3826  		objectMap["diskSku"] = dcr.DiskSku
  3827  	}
  3828  	if dcr.DiskCapacity != nil {
  3829  		objectMap["diskCapacity"] = dcr.DiskCapacity
  3830  	}
  3831  	if dcr.AvailabilityZone != nil {
  3832  		objectMap["availabilityZone"] = dcr.AvailabilityZone
  3833  	}
  3834  	return json.Marshal(objectMap)
  3835  }
  3836  
  3837  // ErrorResponse error Response.
  3838  type ErrorResponse struct {
  3839  	// Code - Error code.
  3840  	Code *string `json:"code,omitempty"`
  3841  	// Message - Error message indicating why the operation failed.
  3842  	Message *string `json:"message,omitempty"`
  3843  }
  3844  
  3845  // ExcludedPath ...
  3846  type ExcludedPath struct {
  3847  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  3848  	Path *string `json:"path,omitempty"`
  3849  }
  3850  
  3851  // ExtendedResourceProperties the system generated resource properties associated with SQL databases, SQL
  3852  // containers, Gremlin databases and Gremlin graphs.
  3853  type ExtendedResourceProperties struct {
  3854  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  3855  	Rid *string `json:"_rid,omitempty"`
  3856  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  3857  	Ts *float64 `json:"_ts,omitempty"`
  3858  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  3859  	Etag *string `json:"_etag,omitempty"`
  3860  }
  3861  
  3862  // MarshalJSON is the custom marshaler for ExtendedResourceProperties.
  3863  func (erp ExtendedResourceProperties) MarshalJSON() ([]byte, error) {
  3864  	objectMap := make(map[string]interface{})
  3865  	return json.Marshal(objectMap)
  3866  }
  3867  
  3868  // FailoverPolicies the list of new failover policies for the failover priority change.
  3869  type FailoverPolicies struct {
  3870  	// FailoverPolicies - List of failover policies.
  3871  	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
  3872  }
  3873  
  3874  // FailoverPolicy the failover policy for a given region of a database account.
  3875  type FailoverPolicy struct {
  3876  	// ID - READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  3877  	ID *string `json:"id,omitempty"`
  3878  	// LocationName - The name of the region in which the database account exists.
  3879  	LocationName *string `json:"locationName,omitempty"`
  3880  	// 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.
  3881  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  3882  }
  3883  
  3884  // MarshalJSON is the custom marshaler for FailoverPolicy.
  3885  func (fp FailoverPolicy) MarshalJSON() ([]byte, error) {
  3886  	objectMap := make(map[string]interface{})
  3887  	if fp.LocationName != nil {
  3888  		objectMap["locationName"] = fp.LocationName
  3889  	}
  3890  	if fp.FailoverPriority != nil {
  3891  		objectMap["failoverPriority"] = fp.FailoverPriority
  3892  	}
  3893  	return json.Marshal(objectMap)
  3894  }
  3895  
  3896  // GremlinDatabaseCreateUpdateParameters parameters to create and update Cosmos DB Gremlin database.
  3897  type GremlinDatabaseCreateUpdateParameters struct {
  3898  	// GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
  3899  	*GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  3900  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  3901  	ID *string `json:"id,omitempty"`
  3902  	// Name - READ-ONLY; The name of the ARM resource.
  3903  	Name *string `json:"name,omitempty"`
  3904  	// Type - READ-ONLY; The type of Azure resource.
  3905  	Type *string `json:"type,omitempty"`
  3906  	// Location - The location of the resource group to which the resource belongs.
  3907  	Location *string            `json:"location,omitempty"`
  3908  	Tags     map[string]*string `json:"tags"`
  3909  }
  3910  
  3911  // MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateParameters.
  3912  func (gdcup GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  3913  	objectMap := make(map[string]interface{})
  3914  	if gdcup.GremlinDatabaseCreateUpdateProperties != nil {
  3915  		objectMap["properties"] = gdcup.GremlinDatabaseCreateUpdateProperties
  3916  	}
  3917  	if gdcup.Location != nil {
  3918  		objectMap["location"] = gdcup.Location
  3919  	}
  3920  	if gdcup.Tags != nil {
  3921  		objectMap["tags"] = gdcup.Tags
  3922  	}
  3923  	return json.Marshal(objectMap)
  3924  }
  3925  
  3926  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseCreateUpdateParameters struct.
  3927  func (gdcup *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  3928  	var m map[string]*json.RawMessage
  3929  	err := json.Unmarshal(body, &m)
  3930  	if err != nil {
  3931  		return err
  3932  	}
  3933  	for k, v := range m {
  3934  		switch k {
  3935  		case "properties":
  3936  			if v != nil {
  3937  				var gremlinDatabaseCreateUpdateProperties GremlinDatabaseCreateUpdateProperties
  3938  				err = json.Unmarshal(*v, &gremlinDatabaseCreateUpdateProperties)
  3939  				if err != nil {
  3940  					return err
  3941  				}
  3942  				gdcup.GremlinDatabaseCreateUpdateProperties = &gremlinDatabaseCreateUpdateProperties
  3943  			}
  3944  		case "id":
  3945  			if v != nil {
  3946  				var ID string
  3947  				err = json.Unmarshal(*v, &ID)
  3948  				if err != nil {
  3949  					return err
  3950  				}
  3951  				gdcup.ID = &ID
  3952  			}
  3953  		case "name":
  3954  			if v != nil {
  3955  				var name string
  3956  				err = json.Unmarshal(*v, &name)
  3957  				if err != nil {
  3958  					return err
  3959  				}
  3960  				gdcup.Name = &name
  3961  			}
  3962  		case "type":
  3963  			if v != nil {
  3964  				var typeVar string
  3965  				err = json.Unmarshal(*v, &typeVar)
  3966  				if err != nil {
  3967  					return err
  3968  				}
  3969  				gdcup.Type = &typeVar
  3970  			}
  3971  		case "location":
  3972  			if v != nil {
  3973  				var location string
  3974  				err = json.Unmarshal(*v, &location)
  3975  				if err != nil {
  3976  					return err
  3977  				}
  3978  				gdcup.Location = &location
  3979  			}
  3980  		case "tags":
  3981  			if v != nil {
  3982  				var tags map[string]*string
  3983  				err = json.Unmarshal(*v, &tags)
  3984  				if err != nil {
  3985  					return err
  3986  				}
  3987  				gdcup.Tags = tags
  3988  			}
  3989  		}
  3990  	}
  3991  
  3992  	return nil
  3993  }
  3994  
  3995  // GremlinDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin database.
  3996  type GremlinDatabaseCreateUpdateProperties struct {
  3997  	// Resource - The standard JSON format of a Gremlin database
  3998  	Resource *GremlinDatabaseResource `json:"resource,omitempty"`
  3999  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4000  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4001  }
  4002  
  4003  // GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
  4004  type GremlinDatabaseGetProperties struct {
  4005  	Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"`
  4006  	Options  *GremlinDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  4007  }
  4008  
  4009  // GremlinDatabaseGetPropertiesOptions ...
  4010  type GremlinDatabaseGetPropertiesOptions struct {
  4011  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4012  	Throughput *int32 `json:"throughput,omitempty"`
  4013  	// AutoscaleSettings - Specifies the Autoscale settings.
  4014  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4015  }
  4016  
  4017  // GremlinDatabaseGetPropertiesResource ...
  4018  type GremlinDatabaseGetPropertiesResource struct {
  4019  	// ID - Name of the Cosmos DB Gremlin database
  4020  	ID *string `json:"id,omitempty"`
  4021  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4022  	Rid *string `json:"_rid,omitempty"`
  4023  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4024  	Ts *float64 `json:"_ts,omitempty"`
  4025  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4026  	Etag *string `json:"_etag,omitempty"`
  4027  }
  4028  
  4029  // MarshalJSON is the custom marshaler for GremlinDatabaseGetPropertiesResource.
  4030  func (gdgp GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4031  	objectMap := make(map[string]interface{})
  4032  	if gdgp.ID != nil {
  4033  		objectMap["id"] = gdgp.ID
  4034  	}
  4035  	return json.Marshal(objectMap)
  4036  }
  4037  
  4038  // GremlinDatabaseGetResults an Azure Cosmos DB Gremlin database.
  4039  type GremlinDatabaseGetResults struct {
  4040  	autorest.Response `json:"-"`
  4041  	// GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
  4042  	*GremlinDatabaseGetProperties `json:"properties,omitempty"`
  4043  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4044  	ID *string `json:"id,omitempty"`
  4045  	// Name - READ-ONLY; The name of the ARM resource.
  4046  	Name *string `json:"name,omitempty"`
  4047  	// Type - READ-ONLY; The type of Azure resource.
  4048  	Type *string `json:"type,omitempty"`
  4049  	// Location - The location of the resource group to which the resource belongs.
  4050  	Location *string            `json:"location,omitempty"`
  4051  	Tags     map[string]*string `json:"tags"`
  4052  }
  4053  
  4054  // MarshalJSON is the custom marshaler for GremlinDatabaseGetResults.
  4055  func (gdgr GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) {
  4056  	objectMap := make(map[string]interface{})
  4057  	if gdgr.GremlinDatabaseGetProperties != nil {
  4058  		objectMap["properties"] = gdgr.GremlinDatabaseGetProperties
  4059  	}
  4060  	if gdgr.Location != nil {
  4061  		objectMap["location"] = gdgr.Location
  4062  	}
  4063  	if gdgr.Tags != nil {
  4064  		objectMap["tags"] = gdgr.Tags
  4065  	}
  4066  	return json.Marshal(objectMap)
  4067  }
  4068  
  4069  // UnmarshalJSON is the custom unmarshaler for GremlinDatabaseGetResults struct.
  4070  func (gdgr *GremlinDatabaseGetResults) UnmarshalJSON(body []byte) error {
  4071  	var m map[string]*json.RawMessage
  4072  	err := json.Unmarshal(body, &m)
  4073  	if err != nil {
  4074  		return err
  4075  	}
  4076  	for k, v := range m {
  4077  		switch k {
  4078  		case "properties":
  4079  			if v != nil {
  4080  				var gremlinDatabaseGetProperties GremlinDatabaseGetProperties
  4081  				err = json.Unmarshal(*v, &gremlinDatabaseGetProperties)
  4082  				if err != nil {
  4083  					return err
  4084  				}
  4085  				gdgr.GremlinDatabaseGetProperties = &gremlinDatabaseGetProperties
  4086  			}
  4087  		case "id":
  4088  			if v != nil {
  4089  				var ID string
  4090  				err = json.Unmarshal(*v, &ID)
  4091  				if err != nil {
  4092  					return err
  4093  				}
  4094  				gdgr.ID = &ID
  4095  			}
  4096  		case "name":
  4097  			if v != nil {
  4098  				var name string
  4099  				err = json.Unmarshal(*v, &name)
  4100  				if err != nil {
  4101  					return err
  4102  				}
  4103  				gdgr.Name = &name
  4104  			}
  4105  		case "type":
  4106  			if v != nil {
  4107  				var typeVar string
  4108  				err = json.Unmarshal(*v, &typeVar)
  4109  				if err != nil {
  4110  					return err
  4111  				}
  4112  				gdgr.Type = &typeVar
  4113  			}
  4114  		case "location":
  4115  			if v != nil {
  4116  				var location string
  4117  				err = json.Unmarshal(*v, &location)
  4118  				if err != nil {
  4119  					return err
  4120  				}
  4121  				gdgr.Location = &location
  4122  			}
  4123  		case "tags":
  4124  			if v != nil {
  4125  				var tags map[string]*string
  4126  				err = json.Unmarshal(*v, &tags)
  4127  				if err != nil {
  4128  					return err
  4129  				}
  4130  				gdgr.Tags = tags
  4131  			}
  4132  		}
  4133  	}
  4134  
  4135  	return nil
  4136  }
  4137  
  4138  // GremlinDatabaseListResult the List operation response, that contains the Gremlin databases and their
  4139  // properties.
  4140  type GremlinDatabaseListResult struct {
  4141  	autorest.Response `json:"-"`
  4142  	// Value - READ-ONLY; List of Gremlin databases and their properties.
  4143  	Value *[]GremlinDatabaseGetResults `json:"value,omitempty"`
  4144  }
  4145  
  4146  // MarshalJSON is the custom marshaler for GremlinDatabaseListResult.
  4147  func (gdlr GremlinDatabaseListResult) MarshalJSON() ([]byte, error) {
  4148  	objectMap := make(map[string]interface{})
  4149  	return json.Marshal(objectMap)
  4150  }
  4151  
  4152  // GremlinDatabaseResource cosmos DB Gremlin database resource object
  4153  type GremlinDatabaseResource struct {
  4154  	// ID - Name of the Cosmos DB Gremlin database
  4155  	ID *string `json:"id,omitempty"`
  4156  }
  4157  
  4158  // GremlinGraphCreateUpdateParameters parameters to create and update Cosmos DB Gremlin graph.
  4159  type GremlinGraphCreateUpdateParameters struct {
  4160  	// GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
  4161  	*GremlinGraphCreateUpdateProperties `json:"properties,omitempty"`
  4162  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4163  	ID *string `json:"id,omitempty"`
  4164  	// Name - READ-ONLY; The name of the ARM resource.
  4165  	Name *string `json:"name,omitempty"`
  4166  	// Type - READ-ONLY; The type of Azure resource.
  4167  	Type *string `json:"type,omitempty"`
  4168  	// Location - The location of the resource group to which the resource belongs.
  4169  	Location *string            `json:"location,omitempty"`
  4170  	Tags     map[string]*string `json:"tags"`
  4171  }
  4172  
  4173  // MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateParameters.
  4174  func (ggcup GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  4175  	objectMap := make(map[string]interface{})
  4176  	if ggcup.GremlinGraphCreateUpdateProperties != nil {
  4177  		objectMap["properties"] = ggcup.GremlinGraphCreateUpdateProperties
  4178  	}
  4179  	if ggcup.Location != nil {
  4180  		objectMap["location"] = ggcup.Location
  4181  	}
  4182  	if ggcup.Tags != nil {
  4183  		objectMap["tags"] = ggcup.Tags
  4184  	}
  4185  	return json.Marshal(objectMap)
  4186  }
  4187  
  4188  // UnmarshalJSON is the custom unmarshaler for GremlinGraphCreateUpdateParameters struct.
  4189  func (ggcup *GremlinGraphCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  4190  	var m map[string]*json.RawMessage
  4191  	err := json.Unmarshal(body, &m)
  4192  	if err != nil {
  4193  		return err
  4194  	}
  4195  	for k, v := range m {
  4196  		switch k {
  4197  		case "properties":
  4198  			if v != nil {
  4199  				var gremlinGraphCreateUpdateProperties GremlinGraphCreateUpdateProperties
  4200  				err = json.Unmarshal(*v, &gremlinGraphCreateUpdateProperties)
  4201  				if err != nil {
  4202  					return err
  4203  				}
  4204  				ggcup.GremlinGraphCreateUpdateProperties = &gremlinGraphCreateUpdateProperties
  4205  			}
  4206  		case "id":
  4207  			if v != nil {
  4208  				var ID string
  4209  				err = json.Unmarshal(*v, &ID)
  4210  				if err != nil {
  4211  					return err
  4212  				}
  4213  				ggcup.ID = &ID
  4214  			}
  4215  		case "name":
  4216  			if v != nil {
  4217  				var name string
  4218  				err = json.Unmarshal(*v, &name)
  4219  				if err != nil {
  4220  					return err
  4221  				}
  4222  				ggcup.Name = &name
  4223  			}
  4224  		case "type":
  4225  			if v != nil {
  4226  				var typeVar string
  4227  				err = json.Unmarshal(*v, &typeVar)
  4228  				if err != nil {
  4229  					return err
  4230  				}
  4231  				ggcup.Type = &typeVar
  4232  			}
  4233  		case "location":
  4234  			if v != nil {
  4235  				var location string
  4236  				err = json.Unmarshal(*v, &location)
  4237  				if err != nil {
  4238  					return err
  4239  				}
  4240  				ggcup.Location = &location
  4241  			}
  4242  		case "tags":
  4243  			if v != nil {
  4244  				var tags map[string]*string
  4245  				err = json.Unmarshal(*v, &tags)
  4246  				if err != nil {
  4247  					return err
  4248  				}
  4249  				ggcup.Tags = tags
  4250  			}
  4251  		}
  4252  	}
  4253  
  4254  	return nil
  4255  }
  4256  
  4257  // GremlinGraphCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin graph.
  4258  type GremlinGraphCreateUpdateProperties struct {
  4259  	// Resource - The standard JSON format of a Gremlin graph
  4260  	Resource *GremlinGraphResource `json:"resource,omitempty"`
  4261  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  4262  	Options *CreateUpdateOptions `json:"options,omitempty"`
  4263  }
  4264  
  4265  // GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph
  4266  type GremlinGraphGetProperties struct {
  4267  	Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"`
  4268  	Options  *GremlinGraphGetPropertiesOptions  `json:"options,omitempty"`
  4269  }
  4270  
  4271  // GremlinGraphGetPropertiesOptions ...
  4272  type GremlinGraphGetPropertiesOptions struct {
  4273  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  4274  	Throughput *int32 `json:"throughput,omitempty"`
  4275  	// AutoscaleSettings - Specifies the Autoscale settings.
  4276  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  4277  }
  4278  
  4279  // GremlinGraphGetPropertiesResource ...
  4280  type GremlinGraphGetPropertiesResource struct {
  4281  	// ID - Name of the Cosmos DB Gremlin graph
  4282  	ID *string `json:"id,omitempty"`
  4283  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4284  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4285  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4286  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4287  	// DefaultTTL - Default time to live
  4288  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4289  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4290  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4291  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4292  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4293  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  4294  	Rid *string `json:"_rid,omitempty"`
  4295  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  4296  	Ts *float64 `json:"_ts,omitempty"`
  4297  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  4298  	Etag *string `json:"_etag,omitempty"`
  4299  }
  4300  
  4301  // MarshalJSON is the custom marshaler for GremlinGraphGetPropertiesResource.
  4302  func (gggp GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error) {
  4303  	objectMap := make(map[string]interface{})
  4304  	if gggp.ID != nil {
  4305  		objectMap["id"] = gggp.ID
  4306  	}
  4307  	if gggp.IndexingPolicy != nil {
  4308  		objectMap["indexingPolicy"] = gggp.IndexingPolicy
  4309  	}
  4310  	if gggp.PartitionKey != nil {
  4311  		objectMap["partitionKey"] = gggp.PartitionKey
  4312  	}
  4313  	if gggp.DefaultTTL != nil {
  4314  		objectMap["defaultTtl"] = gggp.DefaultTTL
  4315  	}
  4316  	if gggp.UniqueKeyPolicy != nil {
  4317  		objectMap["uniqueKeyPolicy"] = gggp.UniqueKeyPolicy
  4318  	}
  4319  	if gggp.ConflictResolutionPolicy != nil {
  4320  		objectMap["conflictResolutionPolicy"] = gggp.ConflictResolutionPolicy
  4321  	}
  4322  	return json.Marshal(objectMap)
  4323  }
  4324  
  4325  // GremlinGraphGetResults an Azure Cosmos DB Gremlin graph.
  4326  type GremlinGraphGetResults struct {
  4327  	autorest.Response `json:"-"`
  4328  	// GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph
  4329  	*GremlinGraphGetProperties `json:"properties,omitempty"`
  4330  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  4331  	ID *string `json:"id,omitempty"`
  4332  	// Name - READ-ONLY; The name of the ARM resource.
  4333  	Name *string `json:"name,omitempty"`
  4334  	// Type - READ-ONLY; The type of Azure resource.
  4335  	Type *string `json:"type,omitempty"`
  4336  	// Location - The location of the resource group to which the resource belongs.
  4337  	Location *string            `json:"location,omitempty"`
  4338  	Tags     map[string]*string `json:"tags"`
  4339  }
  4340  
  4341  // MarshalJSON is the custom marshaler for GremlinGraphGetResults.
  4342  func (gggr GremlinGraphGetResults) MarshalJSON() ([]byte, error) {
  4343  	objectMap := make(map[string]interface{})
  4344  	if gggr.GremlinGraphGetProperties != nil {
  4345  		objectMap["properties"] = gggr.GremlinGraphGetProperties
  4346  	}
  4347  	if gggr.Location != nil {
  4348  		objectMap["location"] = gggr.Location
  4349  	}
  4350  	if gggr.Tags != nil {
  4351  		objectMap["tags"] = gggr.Tags
  4352  	}
  4353  	return json.Marshal(objectMap)
  4354  }
  4355  
  4356  // UnmarshalJSON is the custom unmarshaler for GremlinGraphGetResults struct.
  4357  func (gggr *GremlinGraphGetResults) UnmarshalJSON(body []byte) error {
  4358  	var m map[string]*json.RawMessage
  4359  	err := json.Unmarshal(body, &m)
  4360  	if err != nil {
  4361  		return err
  4362  	}
  4363  	for k, v := range m {
  4364  		switch k {
  4365  		case "properties":
  4366  			if v != nil {
  4367  				var gremlinGraphGetProperties GremlinGraphGetProperties
  4368  				err = json.Unmarshal(*v, &gremlinGraphGetProperties)
  4369  				if err != nil {
  4370  					return err
  4371  				}
  4372  				gggr.GremlinGraphGetProperties = &gremlinGraphGetProperties
  4373  			}
  4374  		case "id":
  4375  			if v != nil {
  4376  				var ID string
  4377  				err = json.Unmarshal(*v, &ID)
  4378  				if err != nil {
  4379  					return err
  4380  				}
  4381  				gggr.ID = &ID
  4382  			}
  4383  		case "name":
  4384  			if v != nil {
  4385  				var name string
  4386  				err = json.Unmarshal(*v, &name)
  4387  				if err != nil {
  4388  					return err
  4389  				}
  4390  				gggr.Name = &name
  4391  			}
  4392  		case "type":
  4393  			if v != nil {
  4394  				var typeVar string
  4395  				err = json.Unmarshal(*v, &typeVar)
  4396  				if err != nil {
  4397  					return err
  4398  				}
  4399  				gggr.Type = &typeVar
  4400  			}
  4401  		case "location":
  4402  			if v != nil {
  4403  				var location string
  4404  				err = json.Unmarshal(*v, &location)
  4405  				if err != nil {
  4406  					return err
  4407  				}
  4408  				gggr.Location = &location
  4409  			}
  4410  		case "tags":
  4411  			if v != nil {
  4412  				var tags map[string]*string
  4413  				err = json.Unmarshal(*v, &tags)
  4414  				if err != nil {
  4415  					return err
  4416  				}
  4417  				gggr.Tags = tags
  4418  			}
  4419  		}
  4420  	}
  4421  
  4422  	return nil
  4423  }
  4424  
  4425  // GremlinGraphListResult the List operation response, that contains the graphs and their properties.
  4426  type GremlinGraphListResult struct {
  4427  	autorest.Response `json:"-"`
  4428  	// Value - READ-ONLY; List of graphs and their properties.
  4429  	Value *[]GremlinGraphGetResults `json:"value,omitempty"`
  4430  }
  4431  
  4432  // MarshalJSON is the custom marshaler for GremlinGraphListResult.
  4433  func (gglr GremlinGraphListResult) MarshalJSON() ([]byte, error) {
  4434  	objectMap := make(map[string]interface{})
  4435  	return json.Marshal(objectMap)
  4436  }
  4437  
  4438  // GremlinGraphResource cosmos DB Gremlin graph resource object
  4439  type GremlinGraphResource struct {
  4440  	// ID - Name of the Cosmos DB Gremlin graph
  4441  	ID *string `json:"id,omitempty"`
  4442  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
  4443  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  4444  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  4445  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  4446  	// DefaultTTL - Default time to live
  4447  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  4448  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  4449  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  4450  	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
  4451  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  4452  }
  4453  
  4454  // GremlinResourcesCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the
  4455  // results of a long-running operation.
  4456  type GremlinResourcesCreateUpdateGremlinDatabaseFuture struct {
  4457  	azure.FutureAPI
  4458  	// Result returns the result of the asynchronous operation.
  4459  	// If the operation has not completed it will return an error.
  4460  	Result func(GremlinResourcesClient) (GremlinDatabaseGetResults, error)
  4461  }
  4462  
  4463  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4464  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  4465  	var azFuture azure.Future
  4466  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4467  		return err
  4468  	}
  4469  	future.FutureAPI = &azFuture
  4470  	future.Result = future.result
  4471  	return nil
  4472  }
  4473  
  4474  // result is the default implementation for GremlinResourcesCreateUpdateGremlinDatabaseFuture.Result.
  4475  func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) result(client GremlinResourcesClient) (gdgr GremlinDatabaseGetResults, err error) {
  4476  	var done bool
  4477  	done, err = future.DoneWithContext(context.Background(), client)
  4478  	if err != nil {
  4479  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  4480  		return
  4481  	}
  4482  	if !done {
  4483  		gdgr.Response.Response = future.Response()
  4484  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture")
  4485  		return
  4486  	}
  4487  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4488  	if gdgr.Response.Response, err = future.GetResult(sender); err == nil && gdgr.Response.Response.StatusCode != http.StatusNoContent {
  4489  		gdgr, err = client.CreateUpdateGremlinDatabaseResponder(gdgr.Response.Response)
  4490  		if err != nil {
  4491  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", gdgr.Response.Response, "Failure responding to request")
  4492  		}
  4493  	}
  4494  	return
  4495  }
  4496  
  4497  // GremlinResourcesCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results
  4498  // of a long-running operation.
  4499  type GremlinResourcesCreateUpdateGremlinGraphFuture struct {
  4500  	azure.FutureAPI
  4501  	// Result returns the result of the asynchronous operation.
  4502  	// If the operation has not completed it will return an error.
  4503  	Result func(GremlinResourcesClient) (GremlinGraphGetResults, error)
  4504  }
  4505  
  4506  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4507  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  4508  	var azFuture azure.Future
  4509  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4510  		return err
  4511  	}
  4512  	future.FutureAPI = &azFuture
  4513  	future.Result = future.result
  4514  	return nil
  4515  }
  4516  
  4517  // result is the default implementation for GremlinResourcesCreateUpdateGremlinGraphFuture.Result.
  4518  func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) result(client GremlinResourcesClient) (gggr GremlinGraphGetResults, err error) {
  4519  	var done bool
  4520  	done, err = future.DoneWithContext(context.Background(), client)
  4521  	if err != nil {
  4522  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  4523  		return
  4524  	}
  4525  	if !done {
  4526  		gggr.Response.Response = future.Response()
  4527  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture")
  4528  		return
  4529  	}
  4530  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4531  	if gggr.Response.Response, err = future.GetResult(sender); err == nil && gggr.Response.Response.StatusCode != http.StatusNoContent {
  4532  		gggr, err = client.CreateUpdateGremlinGraphResponder(gggr.Response.Response)
  4533  		if err != nil {
  4534  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", gggr.Response.Response, "Failure responding to request")
  4535  		}
  4536  	}
  4537  	return
  4538  }
  4539  
  4540  // GremlinResourcesDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of
  4541  // a long-running operation.
  4542  type GremlinResourcesDeleteGremlinDatabaseFuture struct {
  4543  	azure.FutureAPI
  4544  	// Result returns the result of the asynchronous operation.
  4545  	// If the operation has not completed it will return an error.
  4546  	Result func(GremlinResourcesClient) (autorest.Response, error)
  4547  }
  4548  
  4549  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4550  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) UnmarshalJSON(body []byte) error {
  4551  	var azFuture azure.Future
  4552  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4553  		return err
  4554  	}
  4555  	future.FutureAPI = &azFuture
  4556  	future.Result = future.result
  4557  	return nil
  4558  }
  4559  
  4560  // result is the default implementation for GremlinResourcesDeleteGremlinDatabaseFuture.Result.
  4561  func (future *GremlinResourcesDeleteGremlinDatabaseFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  4562  	var done bool
  4563  	done, err = future.DoneWithContext(context.Background(), client)
  4564  	if err != nil {
  4565  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
  4566  		return
  4567  	}
  4568  	if !done {
  4569  		ar.Response = future.Response()
  4570  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinDatabaseFuture")
  4571  		return
  4572  	}
  4573  	ar.Response = future.Response()
  4574  	return
  4575  }
  4576  
  4577  // GremlinResourcesDeleteGremlinGraphFuture an abstraction for monitoring and retrieving the results of a
  4578  // long-running operation.
  4579  type GremlinResourcesDeleteGremlinGraphFuture struct {
  4580  	azure.FutureAPI
  4581  	// Result returns the result of the asynchronous operation.
  4582  	// If the operation has not completed it will return an error.
  4583  	Result func(GremlinResourcesClient) (autorest.Response, error)
  4584  }
  4585  
  4586  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4587  func (future *GremlinResourcesDeleteGremlinGraphFuture) UnmarshalJSON(body []byte) error {
  4588  	var azFuture azure.Future
  4589  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4590  		return err
  4591  	}
  4592  	future.FutureAPI = &azFuture
  4593  	future.Result = future.result
  4594  	return nil
  4595  }
  4596  
  4597  // result is the default implementation for GremlinResourcesDeleteGremlinGraphFuture.Result.
  4598  func (future *GremlinResourcesDeleteGremlinGraphFuture) result(client GremlinResourcesClient) (ar autorest.Response, err error) {
  4599  	var done bool
  4600  	done, err = future.DoneWithContext(context.Background(), client)
  4601  	if err != nil {
  4602  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinGraphFuture", "Result", future.Response(), "Polling failure")
  4603  		return
  4604  	}
  4605  	if !done {
  4606  		ar.Response = future.Response()
  4607  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinGraphFuture")
  4608  		return
  4609  	}
  4610  	ar.Response = future.Response()
  4611  	return
  4612  }
  4613  
  4614  // GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  4615  // results of a long-running operation.
  4616  type GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture struct {
  4617  	azure.FutureAPI
  4618  	// Result returns the result of the asynchronous operation.
  4619  	// If the operation has not completed it will return an error.
  4620  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4621  }
  4622  
  4623  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4624  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  4625  	var azFuture azure.Future
  4626  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4627  		return err
  4628  	}
  4629  	future.FutureAPI = &azFuture
  4630  	future.Result = future.result
  4631  	return nil
  4632  }
  4633  
  4634  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture.Result.
  4635  func (future *GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4636  	var done bool
  4637  	done, err = future.DoneWithContext(context.Background(), client)
  4638  	if err != nil {
  4639  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  4640  		return
  4641  	}
  4642  	if !done {
  4643  		tsgr.Response.Response = future.Response()
  4644  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture")
  4645  		return
  4646  	}
  4647  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4648  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4649  		tsgr, err = client.MigrateGremlinDatabaseToAutoscaleResponder(tsgr.Response.Response)
  4650  		if err != nil {
  4651  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4652  		}
  4653  	}
  4654  	return
  4655  }
  4656  
  4657  // GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture an abstraction for monitoring and
  4658  // retrieving the results of a long-running operation.
  4659  type GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture struct {
  4660  	azure.FutureAPI
  4661  	// Result returns the result of the asynchronous operation.
  4662  	// If the operation has not completed it will return an error.
  4663  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4664  }
  4665  
  4666  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4667  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  4668  	var azFuture azure.Future
  4669  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4670  		return err
  4671  	}
  4672  	future.FutureAPI = &azFuture
  4673  	future.Result = future.result
  4674  	return nil
  4675  }
  4676  
  4677  // result is the default implementation for GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture.Result.
  4678  func (future *GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4679  	var done bool
  4680  	done, err = future.DoneWithContext(context.Background(), client)
  4681  	if err != nil {
  4682  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  4683  		return
  4684  	}
  4685  	if !done {
  4686  		tsgr.Response.Response = future.Response()
  4687  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture")
  4688  		return
  4689  	}
  4690  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4691  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4692  		tsgr, err = client.MigrateGremlinDatabaseToManualThroughputResponder(tsgr.Response.Response)
  4693  		if err != nil {
  4694  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4695  		}
  4696  	}
  4697  	return
  4698  }
  4699  
  4700  // GremlinResourcesMigrateGremlinGraphToAutoscaleFuture an abstraction for monitoring and retrieving the
  4701  // results of a long-running operation.
  4702  type GremlinResourcesMigrateGremlinGraphToAutoscaleFuture struct {
  4703  	azure.FutureAPI
  4704  	// Result returns the result of the asynchronous operation.
  4705  	// If the operation has not completed it will return an error.
  4706  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4707  }
  4708  
  4709  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4710  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  4711  	var azFuture azure.Future
  4712  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4713  		return err
  4714  	}
  4715  	future.FutureAPI = &azFuture
  4716  	future.Result = future.result
  4717  	return nil
  4718  }
  4719  
  4720  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToAutoscaleFuture.Result.
  4721  func (future *GremlinResourcesMigrateGremlinGraphToAutoscaleFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4722  	var done bool
  4723  	done, err = future.DoneWithContext(context.Background(), client)
  4724  	if err != nil {
  4725  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  4726  		return
  4727  	}
  4728  	if !done {
  4729  		tsgr.Response.Response = future.Response()
  4730  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture")
  4731  		return
  4732  	}
  4733  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4734  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4735  		tsgr, err = client.MigrateGremlinGraphToAutoscaleResponder(tsgr.Response.Response)
  4736  		if err != nil {
  4737  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4738  		}
  4739  	}
  4740  	return
  4741  }
  4742  
  4743  // GremlinResourcesMigrateGremlinGraphToManualThroughputFuture an abstraction for monitoring and retrieving
  4744  // the results of a long-running operation.
  4745  type GremlinResourcesMigrateGremlinGraphToManualThroughputFuture struct {
  4746  	azure.FutureAPI
  4747  	// Result returns the result of the asynchronous operation.
  4748  	// If the operation has not completed it will return an error.
  4749  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4750  }
  4751  
  4752  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4753  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  4754  	var azFuture azure.Future
  4755  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4756  		return err
  4757  	}
  4758  	future.FutureAPI = &azFuture
  4759  	future.Result = future.result
  4760  	return nil
  4761  }
  4762  
  4763  // result is the default implementation for GremlinResourcesMigrateGremlinGraphToManualThroughputFuture.Result.
  4764  func (future *GremlinResourcesMigrateGremlinGraphToManualThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4765  	var done bool
  4766  	done, err = future.DoneWithContext(context.Background(), client)
  4767  	if err != nil {
  4768  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  4769  		return
  4770  	}
  4771  	if !done {
  4772  		tsgr.Response.Response = future.Response()
  4773  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture")
  4774  		return
  4775  	}
  4776  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4777  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4778  		tsgr, err = client.MigrateGremlinGraphToManualThroughputResponder(tsgr.Response.Response)
  4779  		if err != nil {
  4780  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesMigrateGremlinGraphToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4781  		}
  4782  	}
  4783  	return
  4784  }
  4785  
  4786  // GremlinResourcesUpdateGremlinDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  4787  // results of a long-running operation.
  4788  type GremlinResourcesUpdateGremlinDatabaseThroughputFuture struct {
  4789  	azure.FutureAPI
  4790  	// Result returns the result of the asynchronous operation.
  4791  	// If the operation has not completed it will return an error.
  4792  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4793  }
  4794  
  4795  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4796  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  4797  	var azFuture azure.Future
  4798  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4799  		return err
  4800  	}
  4801  	future.FutureAPI = &azFuture
  4802  	future.Result = future.result
  4803  	return nil
  4804  }
  4805  
  4806  // result is the default implementation for GremlinResourcesUpdateGremlinDatabaseThroughputFuture.Result.
  4807  func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4808  	var done bool
  4809  	done, err = future.DoneWithContext(context.Background(), client)
  4810  	if err != nil {
  4811  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  4812  		return
  4813  	}
  4814  	if !done {
  4815  		tsgr.Response.Response = future.Response()
  4816  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture")
  4817  		return
  4818  	}
  4819  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4820  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4821  		tsgr, err = client.UpdateGremlinDatabaseThroughputResponder(tsgr.Response.Response)
  4822  		if err != nil {
  4823  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4824  		}
  4825  	}
  4826  	return
  4827  }
  4828  
  4829  // GremlinResourcesUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the
  4830  // results of a long-running operation.
  4831  type GremlinResourcesUpdateGremlinGraphThroughputFuture struct {
  4832  	azure.FutureAPI
  4833  	// Result returns the result of the asynchronous operation.
  4834  	// If the operation has not completed it will return an error.
  4835  	Result func(GremlinResourcesClient) (ThroughputSettingsGetResults, error)
  4836  }
  4837  
  4838  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4839  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) UnmarshalJSON(body []byte) error {
  4840  	var azFuture azure.Future
  4841  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4842  		return err
  4843  	}
  4844  	future.FutureAPI = &azFuture
  4845  	future.Result = future.result
  4846  	return nil
  4847  }
  4848  
  4849  // result is the default implementation for GremlinResourcesUpdateGremlinGraphThroughputFuture.Result.
  4850  func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  4851  	var done bool
  4852  	done, err = future.DoneWithContext(context.Background(), client)
  4853  	if err != nil {
  4854  		err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", future.Response(), "Polling failure")
  4855  		return
  4856  	}
  4857  	if !done {
  4858  		tsgr.Response.Response = future.Response()
  4859  		err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture")
  4860  		return
  4861  	}
  4862  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4863  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  4864  		tsgr, err = client.UpdateGremlinGraphThroughputResponder(tsgr.Response.Response)
  4865  		if err != nil {
  4866  			err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  4867  		}
  4868  	}
  4869  	return
  4870  }
  4871  
  4872  // IncludedPath the paths that are included in indexing
  4873  type IncludedPath struct {
  4874  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  4875  	Path *string `json:"path,omitempty"`
  4876  	// Indexes - List of indexes for this path
  4877  	Indexes *[]Indexes `json:"indexes,omitempty"`
  4878  }
  4879  
  4880  // Indexes the indexes for the path.
  4881  type Indexes struct {
  4882  	// DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'DataTypeString', 'DataTypeNumber', 'DataTypePoint', 'DataTypePolygon', 'DataTypeLineString', 'DataTypeMultiPolygon'
  4883  	DataType DataType `json:"dataType,omitempty"`
  4884  	// Precision - The precision of the index. -1 is maximum precision.
  4885  	Precision *int32 `json:"precision,omitempty"`
  4886  	// Kind - Indicates the type of index. Possible values include: 'IndexKindHash', 'IndexKindRange', 'IndexKindSpatial'
  4887  	Kind IndexKind `json:"kind,omitempty"`
  4888  }
  4889  
  4890  // IndexingPolicy cosmos DB indexing policy
  4891  type IndexingPolicy struct {
  4892  	// Automatic - Indicates if the indexing policy is automatic
  4893  	Automatic *bool `json:"automatic,omitempty"`
  4894  	// IndexingMode - Indicates the indexing mode. Possible values include: 'IndexingModeConsistent', 'IndexingModeLazy', 'IndexingModeNone'
  4895  	IndexingMode IndexingMode `json:"indexingMode,omitempty"`
  4896  	// IncludedPaths - List of paths to include in the indexing
  4897  	IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"`
  4898  	// ExcludedPaths - List of paths to exclude from indexing
  4899  	ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"`
  4900  	// CompositeIndexes - List of composite path list
  4901  	CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"`
  4902  	// SpatialIndexes - List of spatial specifics
  4903  	SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"`
  4904  }
  4905  
  4906  // IPAddressOrRange ipAddressOrRange object
  4907  type IPAddressOrRange struct {
  4908  	// 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”.
  4909  	IPAddressOrRange *string `json:"ipAddressOrRange,omitempty"`
  4910  }
  4911  
  4912  // ListClusters list of managed Cassandra clusters.
  4913  type ListClusters struct {
  4914  	autorest.Response `json:"-"`
  4915  	// Value - Container for the array of clusters.
  4916  	Value *[]ClusterResource `json:"value,omitempty"`
  4917  }
  4918  
  4919  // ListDataCenters list of managed Cassandra data centers and their properties.
  4920  type ListDataCenters struct {
  4921  	autorest.Response `json:"-"`
  4922  	// Value - READ-ONLY; Container for array of data centers.
  4923  	Value *[]DataCenterResource `json:"value,omitempty"`
  4924  }
  4925  
  4926  // MarshalJSON is the custom marshaler for ListDataCenters.
  4927  func (ldc ListDataCenters) MarshalJSON() ([]byte, error) {
  4928  	objectMap := make(map[string]interface{})
  4929  	return json.Marshal(objectMap)
  4930  }
  4931  
  4932  // Location a region in which the Azure Cosmos DB database account is deployed.
  4933  type Location struct {
  4934  	// ID - READ-ONLY; The unique identifier of the region within the database account. Example: &lt;accountName&gt;-&lt;locationName&gt;.
  4935  	ID *string `json:"id,omitempty"`
  4936  	// LocationName - The name of the region.
  4937  	LocationName *string `json:"locationName,omitempty"`
  4938  	// DocumentEndpoint - READ-ONLY; The connection endpoint for the specific region. Example: https://&lt;accountName&gt;-&lt;locationName&gt;.documents.azure.com:443/
  4939  	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
  4940  	ProvisioningState *string `json:"provisioningState,omitempty"`
  4941  	// 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.
  4942  	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
  4943  	// IsZoneRedundant - Flag to indicate whether or not this region is an AvailabilityZone region
  4944  	IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"`
  4945  }
  4946  
  4947  // MarshalJSON is the custom marshaler for Location.
  4948  func (l Location) MarshalJSON() ([]byte, error) {
  4949  	objectMap := make(map[string]interface{})
  4950  	if l.LocationName != nil {
  4951  		objectMap["locationName"] = l.LocationName
  4952  	}
  4953  	if l.ProvisioningState != nil {
  4954  		objectMap["provisioningState"] = l.ProvisioningState
  4955  	}
  4956  	if l.FailoverPriority != nil {
  4957  		objectMap["failoverPriority"] = l.FailoverPriority
  4958  	}
  4959  	if l.IsZoneRedundant != nil {
  4960  		objectMap["isZoneRedundant"] = l.IsZoneRedundant
  4961  	}
  4962  	return json.Marshal(objectMap)
  4963  }
  4964  
  4965  // LocationGetResult cosmos DB location get result
  4966  type LocationGetResult struct {
  4967  	autorest.Response `json:"-"`
  4968  	// Properties - Cosmos DB location metadata
  4969  	Properties *LocationProperties `json:"properties,omitempty"`
  4970  	// ID - READ-ONLY; The unique resource identifier of the database account.
  4971  	ID *string `json:"id,omitempty"`
  4972  	// Name - READ-ONLY; The name of the database account.
  4973  	Name *string `json:"name,omitempty"`
  4974  	// Type - READ-ONLY; The type of Azure resource.
  4975  	Type *string `json:"type,omitempty"`
  4976  }
  4977  
  4978  // MarshalJSON is the custom marshaler for LocationGetResult.
  4979  func (lgr LocationGetResult) MarshalJSON() ([]byte, error) {
  4980  	objectMap := make(map[string]interface{})
  4981  	if lgr.Properties != nil {
  4982  		objectMap["properties"] = lgr.Properties
  4983  	}
  4984  	return json.Marshal(objectMap)
  4985  }
  4986  
  4987  // LocationListResult the List operation response, that contains Cosmos DB locations and their properties.
  4988  type LocationListResult struct {
  4989  	autorest.Response `json:"-"`
  4990  	// Value - READ-ONLY; List of Cosmos DB locations and their properties.
  4991  	Value *[]LocationGetResult `json:"value,omitempty"`
  4992  }
  4993  
  4994  // MarshalJSON is the custom marshaler for LocationListResult.
  4995  func (llr LocationListResult) MarshalJSON() ([]byte, error) {
  4996  	objectMap := make(map[string]interface{})
  4997  	return json.Marshal(objectMap)
  4998  }
  4999  
  5000  // LocationProperties cosmos DB location metadata
  5001  type LocationProperties struct {
  5002  	// SupportsAvailabilityZone - READ-ONLY; Flag indicating whether the location supports availability zones or not.
  5003  	SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty"`
  5004  	// IsResidencyRestricted - READ-ONLY; Flag indicating whether the location is residency sensitive.
  5005  	IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty"`
  5006  	// BackupStorageRedundancies - READ-ONLY; The properties of available backup storage redundancies.
  5007  	BackupStorageRedundancies *[]BackupStorageRedundancy `json:"backupStorageRedundancies,omitempty"`
  5008  }
  5009  
  5010  // MarshalJSON is the custom marshaler for LocationProperties.
  5011  func (lp LocationProperties) MarshalJSON() ([]byte, error) {
  5012  	objectMap := make(map[string]interface{})
  5013  	return json.Marshal(objectMap)
  5014  }
  5015  
  5016  // ManagedCassandraARMResourceProperties the core properties of ARM resources.
  5017  type ManagedCassandraARMResourceProperties struct {
  5018  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5019  	ID *string `json:"id,omitempty"`
  5020  	// Name - READ-ONLY; The name of the ARM resource.
  5021  	Name *string `json:"name,omitempty"`
  5022  	// Type - READ-ONLY; The type of Azure resource.
  5023  	Type *string `json:"type,omitempty"`
  5024  	// Location - The location of the resource group to which the resource belongs.
  5025  	Location *string                                 `json:"location,omitempty"`
  5026  	Tags     map[string]*string                      `json:"tags"`
  5027  	Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"`
  5028  }
  5029  
  5030  // MarshalJSON is the custom marshaler for ManagedCassandraARMResourceProperties.
  5031  func (mcarp ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error) {
  5032  	objectMap := make(map[string]interface{})
  5033  	if mcarp.Location != nil {
  5034  		objectMap["location"] = mcarp.Location
  5035  	}
  5036  	if mcarp.Tags != nil {
  5037  		objectMap["tags"] = mcarp.Tags
  5038  	}
  5039  	if mcarp.Identity != nil {
  5040  		objectMap["identity"] = mcarp.Identity
  5041  	}
  5042  	return json.Marshal(objectMap)
  5043  }
  5044  
  5045  // ManagedCassandraManagedServiceIdentity identity for the resource.
  5046  type ManagedCassandraManagedServiceIdentity struct {
  5047  	// PrincipalID - READ-ONLY; The object id of the identity resource.
  5048  	PrincipalID *string `json:"principalId,omitempty"`
  5049  	// TenantID - READ-ONLY; The tenant id of the resource.
  5050  	TenantID *string `json:"tenantId,omitempty"`
  5051  	// Type - The type of the resource. Possible values include: 'ManagedCassandraResourceIdentityTypeSystemAssigned', 'ManagedCassandraResourceIdentityTypeNone'
  5052  	Type ManagedCassandraResourceIdentityType `json:"type,omitempty"`
  5053  }
  5054  
  5055  // MarshalJSON is the custom marshaler for ManagedCassandraManagedServiceIdentity.
  5056  func (mcmsi ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  5057  	objectMap := make(map[string]interface{})
  5058  	if mcmsi.Type != "" {
  5059  		objectMap["type"] = mcmsi.Type
  5060  	}
  5061  	return json.Marshal(objectMap)
  5062  }
  5063  
  5064  // ManagedCassandraReaperStatus ...
  5065  type ManagedCassandraReaperStatus struct {
  5066  	Healthy         *bool              `json:"healthy,omitempty"`
  5067  	RepairRunIds    map[string]*string `json:"repairRunIds"`
  5068  	RepairSchedules map[string]*string `json:"repairSchedules"`
  5069  }
  5070  
  5071  // MarshalJSON is the custom marshaler for ManagedCassandraReaperStatus.
  5072  func (mcrs ManagedCassandraReaperStatus) MarshalJSON() ([]byte, error) {
  5073  	objectMap := make(map[string]interface{})
  5074  	if mcrs.Healthy != nil {
  5075  		objectMap["healthy"] = mcrs.Healthy
  5076  	}
  5077  	if mcrs.RepairRunIds != nil {
  5078  		objectMap["repairRunIds"] = mcrs.RepairRunIds
  5079  	}
  5080  	if mcrs.RepairSchedules != nil {
  5081  		objectMap["repairSchedules"] = mcrs.RepairSchedules
  5082  	}
  5083  	return json.Marshal(objectMap)
  5084  }
  5085  
  5086  // ManagedServiceIdentity identity for the resource.
  5087  type ManagedServiceIdentity struct {
  5088  	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
  5089  	PrincipalID *string `json:"principalId,omitempty"`
  5090  	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
  5091  	TenantID *string `json:"tenantId,omitempty"`
  5092  	// 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'
  5093  	Type ResourceIdentityType `json:"type,omitempty"`
  5094  	// 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}'.
  5095  	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
  5096  }
  5097  
  5098  // MarshalJSON is the custom marshaler for ManagedServiceIdentity.
  5099  func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  5100  	objectMap := make(map[string]interface{})
  5101  	if msi.Type != "" {
  5102  		objectMap["type"] = msi.Type
  5103  	}
  5104  	if msi.UserAssignedIdentities != nil {
  5105  		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
  5106  	}
  5107  	return json.Marshal(objectMap)
  5108  }
  5109  
  5110  // ManagedServiceIdentityUserAssignedIdentitiesValue ...
  5111  type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
  5112  	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
  5113  	PrincipalID *string `json:"principalId,omitempty"`
  5114  	// ClientID - READ-ONLY; The client id of user assigned identity.
  5115  	ClientID *string `json:"clientId,omitempty"`
  5116  }
  5117  
  5118  // MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
  5119  func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
  5120  	objectMap := make(map[string]interface{})
  5121  	return json.Marshal(objectMap)
  5122  }
  5123  
  5124  // Metric metric data
  5125  type Metric struct {
  5126  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  5127  	StartTime *date.Time `json:"startTime,omitempty"`
  5128  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  5129  	EndTime *date.Time `json:"endTime,omitempty"`
  5130  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5131  	TimeGrain *string `json:"timeGrain,omitempty"`
  5132  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  5133  	Unit UnitType `json:"unit,omitempty"`
  5134  	// Name - READ-ONLY; The name information for the metric.
  5135  	Name *MetricName `json:"name,omitempty"`
  5136  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  5137  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  5138  }
  5139  
  5140  // MarshalJSON is the custom marshaler for Metric.
  5141  func (mVar Metric) MarshalJSON() ([]byte, error) {
  5142  	objectMap := make(map[string]interface{})
  5143  	if mVar.Unit != "" {
  5144  		objectMap["unit"] = mVar.Unit
  5145  	}
  5146  	return json.Marshal(objectMap)
  5147  }
  5148  
  5149  // MetricAvailability the availability of the metric.
  5150  type MetricAvailability struct {
  5151  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  5152  	TimeGrain *string `json:"timeGrain,omitempty"`
  5153  	// Retention - READ-ONLY; The retention for the metric values.
  5154  	Retention *string `json:"retention,omitempty"`
  5155  }
  5156  
  5157  // MarshalJSON is the custom marshaler for MetricAvailability.
  5158  func (ma MetricAvailability) MarshalJSON() ([]byte, error) {
  5159  	objectMap := make(map[string]interface{})
  5160  	return json.Marshal(objectMap)
  5161  }
  5162  
  5163  // MetricDefinition the definition of a metric.
  5164  type MetricDefinition struct {
  5165  	// MetricAvailabilities - READ-ONLY; The list of metric availabilities for the account.
  5166  	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
  5167  	// PrimaryAggregationType - READ-ONLY; The primary aggregation type of the metric. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeTotal', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeLast'
  5168  	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
  5169  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  5170  	Unit UnitType `json:"unit,omitempty"`
  5171  	// ResourceURI - READ-ONLY; The resource uri of the database.
  5172  	ResourceURI *string `json:"resourceUri,omitempty"`
  5173  	// Name - READ-ONLY; The name information for the metric.
  5174  	Name *MetricName `json:"name,omitempty"`
  5175  }
  5176  
  5177  // MarshalJSON is the custom marshaler for MetricDefinition.
  5178  func (md MetricDefinition) MarshalJSON() ([]byte, error) {
  5179  	objectMap := make(map[string]interface{})
  5180  	if md.Unit != "" {
  5181  		objectMap["unit"] = md.Unit
  5182  	}
  5183  	return json.Marshal(objectMap)
  5184  }
  5185  
  5186  // MetricDefinitionsListResult the response to a list metric definitions request.
  5187  type MetricDefinitionsListResult struct {
  5188  	autorest.Response `json:"-"`
  5189  	// Value - READ-ONLY; The list of metric definitions for the account.
  5190  	Value *[]MetricDefinition `json:"value,omitempty"`
  5191  }
  5192  
  5193  // MarshalJSON is the custom marshaler for MetricDefinitionsListResult.
  5194  func (mdlr MetricDefinitionsListResult) MarshalJSON() ([]byte, error) {
  5195  	objectMap := make(map[string]interface{})
  5196  	return json.Marshal(objectMap)
  5197  }
  5198  
  5199  // MetricListResult the response to a list metrics request.
  5200  type MetricListResult struct {
  5201  	autorest.Response `json:"-"`
  5202  	// Value - READ-ONLY; The list of metrics for the account.
  5203  	Value *[]Metric `json:"value,omitempty"`
  5204  }
  5205  
  5206  // MarshalJSON is the custom marshaler for MetricListResult.
  5207  func (mlr MetricListResult) MarshalJSON() ([]byte, error) {
  5208  	objectMap := make(map[string]interface{})
  5209  	return json.Marshal(objectMap)
  5210  }
  5211  
  5212  // MetricName a metric name.
  5213  type MetricName struct {
  5214  	// Value - READ-ONLY; The name of the metric.
  5215  	Value *string `json:"value,omitempty"`
  5216  	// LocalizedValue - READ-ONLY; The friendly name of the metric.
  5217  	LocalizedValue *string `json:"localizedValue,omitempty"`
  5218  }
  5219  
  5220  // MarshalJSON is the custom marshaler for MetricName.
  5221  func (mn MetricName) MarshalJSON() ([]byte, error) {
  5222  	objectMap := make(map[string]interface{})
  5223  	return json.Marshal(objectMap)
  5224  }
  5225  
  5226  // MetricValue represents metrics values.
  5227  type MetricValue struct {
  5228  	// Count - READ-ONLY; The number of values for the metric.
  5229  	Count *float64 `json:"_count,omitempty"`
  5230  	// Average - READ-ONLY; The average value of the metric.
  5231  	Average *float64 `json:"average,omitempty"`
  5232  	// Maximum - READ-ONLY; The max value of the metric.
  5233  	Maximum *float64 `json:"maximum,omitempty"`
  5234  	// Minimum - READ-ONLY; The min value of the metric.
  5235  	Minimum *float64 `json:"minimum,omitempty"`
  5236  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  5237  	Timestamp *date.Time `json:"timestamp,omitempty"`
  5238  	// Total - READ-ONLY; The total value of the metric.
  5239  	Total *float64 `json:"total,omitempty"`
  5240  }
  5241  
  5242  // MarshalJSON is the custom marshaler for MetricValue.
  5243  func (mv MetricValue) MarshalJSON() ([]byte, error) {
  5244  	objectMap := make(map[string]interface{})
  5245  	return json.Marshal(objectMap)
  5246  }
  5247  
  5248  // MongoDBCollectionCreateUpdateParameters parameters to create and update Cosmos DB MongoDB collection.
  5249  type MongoDBCollectionCreateUpdateParameters struct {
  5250  	// MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
  5251  	*MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"`
  5252  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5253  	ID *string `json:"id,omitempty"`
  5254  	// Name - READ-ONLY; The name of the ARM resource.
  5255  	Name *string `json:"name,omitempty"`
  5256  	// Type - READ-ONLY; The type of Azure resource.
  5257  	Type *string `json:"type,omitempty"`
  5258  	// Location - The location of the resource group to which the resource belongs.
  5259  	Location *string            `json:"location,omitempty"`
  5260  	Tags     map[string]*string `json:"tags"`
  5261  }
  5262  
  5263  // MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateParameters.
  5264  func (mdccup MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  5265  	objectMap := make(map[string]interface{})
  5266  	if mdccup.MongoDBCollectionCreateUpdateProperties != nil {
  5267  		objectMap["properties"] = mdccup.MongoDBCollectionCreateUpdateProperties
  5268  	}
  5269  	if mdccup.Location != nil {
  5270  		objectMap["location"] = mdccup.Location
  5271  	}
  5272  	if mdccup.Tags != nil {
  5273  		objectMap["tags"] = mdccup.Tags
  5274  	}
  5275  	return json.Marshal(objectMap)
  5276  }
  5277  
  5278  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionCreateUpdateParameters struct.
  5279  func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  5280  	var m map[string]*json.RawMessage
  5281  	err := json.Unmarshal(body, &m)
  5282  	if err != nil {
  5283  		return err
  5284  	}
  5285  	for k, v := range m {
  5286  		switch k {
  5287  		case "properties":
  5288  			if v != nil {
  5289  				var mongoDBCollectionCreateUpdateProperties MongoDBCollectionCreateUpdateProperties
  5290  				err = json.Unmarshal(*v, &mongoDBCollectionCreateUpdateProperties)
  5291  				if err != nil {
  5292  					return err
  5293  				}
  5294  				mdccup.MongoDBCollectionCreateUpdateProperties = &mongoDBCollectionCreateUpdateProperties
  5295  			}
  5296  		case "id":
  5297  			if v != nil {
  5298  				var ID string
  5299  				err = json.Unmarshal(*v, &ID)
  5300  				if err != nil {
  5301  					return err
  5302  				}
  5303  				mdccup.ID = &ID
  5304  			}
  5305  		case "name":
  5306  			if v != nil {
  5307  				var name string
  5308  				err = json.Unmarshal(*v, &name)
  5309  				if err != nil {
  5310  					return err
  5311  				}
  5312  				mdccup.Name = &name
  5313  			}
  5314  		case "type":
  5315  			if v != nil {
  5316  				var typeVar string
  5317  				err = json.Unmarshal(*v, &typeVar)
  5318  				if err != nil {
  5319  					return err
  5320  				}
  5321  				mdccup.Type = &typeVar
  5322  			}
  5323  		case "location":
  5324  			if v != nil {
  5325  				var location string
  5326  				err = json.Unmarshal(*v, &location)
  5327  				if err != nil {
  5328  					return err
  5329  				}
  5330  				mdccup.Location = &location
  5331  			}
  5332  		case "tags":
  5333  			if v != nil {
  5334  				var tags map[string]*string
  5335  				err = json.Unmarshal(*v, &tags)
  5336  				if err != nil {
  5337  					return err
  5338  				}
  5339  				mdccup.Tags = tags
  5340  			}
  5341  		}
  5342  	}
  5343  
  5344  	return nil
  5345  }
  5346  
  5347  // MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB
  5348  // collection.
  5349  type MongoDBCollectionCreateUpdateProperties struct {
  5350  	// Resource - The standard JSON format of a MongoDB collection
  5351  	Resource *MongoDBCollectionResource `json:"resource,omitempty"`
  5352  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  5353  	Options *CreateUpdateOptions `json:"options,omitempty"`
  5354  }
  5355  
  5356  // MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection
  5357  type MongoDBCollectionGetProperties struct {
  5358  	Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"`
  5359  	Options  *MongoDBCollectionGetPropertiesOptions  `json:"options,omitempty"`
  5360  }
  5361  
  5362  // MongoDBCollectionGetPropertiesOptions ...
  5363  type MongoDBCollectionGetPropertiesOptions struct {
  5364  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  5365  	Throughput *int32 `json:"throughput,omitempty"`
  5366  	// AutoscaleSettings - Specifies the Autoscale settings.
  5367  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  5368  }
  5369  
  5370  // MongoDBCollectionGetPropertiesResource ...
  5371  type MongoDBCollectionGetPropertiesResource struct {
  5372  	// ID - Name of the Cosmos DB MongoDB collection
  5373  	ID *string `json:"id,omitempty"`
  5374  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  5375  	ShardKey map[string]*string `json:"shardKey"`
  5376  	// Indexes - List of index keys
  5377  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  5378  	// AnalyticalStorageTTL - Analytical TTL.
  5379  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  5380  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  5381  	Rid *string `json:"_rid,omitempty"`
  5382  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  5383  	Ts *float64 `json:"_ts,omitempty"`
  5384  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  5385  	Etag *string `json:"_etag,omitempty"`
  5386  }
  5387  
  5388  // MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource.
  5389  func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) {
  5390  	objectMap := make(map[string]interface{})
  5391  	if mdcgp.ID != nil {
  5392  		objectMap["id"] = mdcgp.ID
  5393  	}
  5394  	if mdcgp.ShardKey != nil {
  5395  		objectMap["shardKey"] = mdcgp.ShardKey
  5396  	}
  5397  	if mdcgp.Indexes != nil {
  5398  		objectMap["indexes"] = mdcgp.Indexes
  5399  	}
  5400  	if mdcgp.AnalyticalStorageTTL != nil {
  5401  		objectMap["analyticalStorageTtl"] = mdcgp.AnalyticalStorageTTL
  5402  	}
  5403  	return json.Marshal(objectMap)
  5404  }
  5405  
  5406  // MongoDBCollectionGetResults an Azure Cosmos DB MongoDB collection.
  5407  type MongoDBCollectionGetResults struct {
  5408  	autorest.Response `json:"-"`
  5409  	// MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection
  5410  	*MongoDBCollectionGetProperties `json:"properties,omitempty"`
  5411  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5412  	ID *string `json:"id,omitempty"`
  5413  	// Name - READ-ONLY; The name of the ARM resource.
  5414  	Name *string `json:"name,omitempty"`
  5415  	// Type - READ-ONLY; The type of Azure resource.
  5416  	Type *string `json:"type,omitempty"`
  5417  	// Location - The location of the resource group to which the resource belongs.
  5418  	Location *string            `json:"location,omitempty"`
  5419  	Tags     map[string]*string `json:"tags"`
  5420  }
  5421  
  5422  // MarshalJSON is the custom marshaler for MongoDBCollectionGetResults.
  5423  func (mdcgr MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) {
  5424  	objectMap := make(map[string]interface{})
  5425  	if mdcgr.MongoDBCollectionGetProperties != nil {
  5426  		objectMap["properties"] = mdcgr.MongoDBCollectionGetProperties
  5427  	}
  5428  	if mdcgr.Location != nil {
  5429  		objectMap["location"] = mdcgr.Location
  5430  	}
  5431  	if mdcgr.Tags != nil {
  5432  		objectMap["tags"] = mdcgr.Tags
  5433  	}
  5434  	return json.Marshal(objectMap)
  5435  }
  5436  
  5437  // UnmarshalJSON is the custom unmarshaler for MongoDBCollectionGetResults struct.
  5438  func (mdcgr *MongoDBCollectionGetResults) UnmarshalJSON(body []byte) error {
  5439  	var m map[string]*json.RawMessage
  5440  	err := json.Unmarshal(body, &m)
  5441  	if err != nil {
  5442  		return err
  5443  	}
  5444  	for k, v := range m {
  5445  		switch k {
  5446  		case "properties":
  5447  			if v != nil {
  5448  				var mongoDBCollectionGetProperties MongoDBCollectionGetProperties
  5449  				err = json.Unmarshal(*v, &mongoDBCollectionGetProperties)
  5450  				if err != nil {
  5451  					return err
  5452  				}
  5453  				mdcgr.MongoDBCollectionGetProperties = &mongoDBCollectionGetProperties
  5454  			}
  5455  		case "id":
  5456  			if v != nil {
  5457  				var ID string
  5458  				err = json.Unmarshal(*v, &ID)
  5459  				if err != nil {
  5460  					return err
  5461  				}
  5462  				mdcgr.ID = &ID
  5463  			}
  5464  		case "name":
  5465  			if v != nil {
  5466  				var name string
  5467  				err = json.Unmarshal(*v, &name)
  5468  				if err != nil {
  5469  					return err
  5470  				}
  5471  				mdcgr.Name = &name
  5472  			}
  5473  		case "type":
  5474  			if v != nil {
  5475  				var typeVar string
  5476  				err = json.Unmarshal(*v, &typeVar)
  5477  				if err != nil {
  5478  					return err
  5479  				}
  5480  				mdcgr.Type = &typeVar
  5481  			}
  5482  		case "location":
  5483  			if v != nil {
  5484  				var location string
  5485  				err = json.Unmarshal(*v, &location)
  5486  				if err != nil {
  5487  					return err
  5488  				}
  5489  				mdcgr.Location = &location
  5490  			}
  5491  		case "tags":
  5492  			if v != nil {
  5493  				var tags map[string]*string
  5494  				err = json.Unmarshal(*v, &tags)
  5495  				if err != nil {
  5496  					return err
  5497  				}
  5498  				mdcgr.Tags = tags
  5499  			}
  5500  		}
  5501  	}
  5502  
  5503  	return nil
  5504  }
  5505  
  5506  // MongoDBCollectionListResult the List operation response, that contains the MongoDB collections and their
  5507  // properties.
  5508  type MongoDBCollectionListResult struct {
  5509  	autorest.Response `json:"-"`
  5510  	// Value - READ-ONLY; List of MongoDB collections and their properties.
  5511  	Value *[]MongoDBCollectionGetResults `json:"value,omitempty"`
  5512  }
  5513  
  5514  // MarshalJSON is the custom marshaler for MongoDBCollectionListResult.
  5515  func (mdclr MongoDBCollectionListResult) MarshalJSON() ([]byte, error) {
  5516  	objectMap := make(map[string]interface{})
  5517  	return json.Marshal(objectMap)
  5518  }
  5519  
  5520  // MongoDBCollectionResource cosmos DB MongoDB collection resource object
  5521  type MongoDBCollectionResource struct {
  5522  	// ID - Name of the Cosmos DB MongoDB collection
  5523  	ID *string `json:"id,omitempty"`
  5524  	// ShardKey - A key-value pair of shard keys to be applied for the request.
  5525  	ShardKey map[string]*string `json:"shardKey"`
  5526  	// Indexes - List of index keys
  5527  	Indexes *[]MongoIndex `json:"indexes,omitempty"`
  5528  	// AnalyticalStorageTTL - Analytical TTL.
  5529  	AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"`
  5530  }
  5531  
  5532  // MarshalJSON is the custom marshaler for MongoDBCollectionResource.
  5533  func (mdcr MongoDBCollectionResource) MarshalJSON() ([]byte, error) {
  5534  	objectMap := make(map[string]interface{})
  5535  	if mdcr.ID != nil {
  5536  		objectMap["id"] = mdcr.ID
  5537  	}
  5538  	if mdcr.ShardKey != nil {
  5539  		objectMap["shardKey"] = mdcr.ShardKey
  5540  	}
  5541  	if mdcr.Indexes != nil {
  5542  		objectMap["indexes"] = mdcr.Indexes
  5543  	}
  5544  	if mdcr.AnalyticalStorageTTL != nil {
  5545  		objectMap["analyticalStorageTtl"] = mdcr.AnalyticalStorageTTL
  5546  	}
  5547  	return json.Marshal(objectMap)
  5548  }
  5549  
  5550  // MongoDBDatabaseCreateUpdateParameters parameters to create and update Cosmos DB MongoDB database.
  5551  type MongoDBDatabaseCreateUpdateParameters struct {
  5552  	// MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
  5553  	*MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  5554  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5555  	ID *string `json:"id,omitempty"`
  5556  	// Name - READ-ONLY; The name of the ARM resource.
  5557  	Name *string `json:"name,omitempty"`
  5558  	// Type - READ-ONLY; The type of Azure resource.
  5559  	Type *string `json:"type,omitempty"`
  5560  	// Location - The location of the resource group to which the resource belongs.
  5561  	Location *string            `json:"location,omitempty"`
  5562  	Tags     map[string]*string `json:"tags"`
  5563  }
  5564  
  5565  // MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateParameters.
  5566  func (mddcup MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  5567  	objectMap := make(map[string]interface{})
  5568  	if mddcup.MongoDBDatabaseCreateUpdateProperties != nil {
  5569  		objectMap["properties"] = mddcup.MongoDBDatabaseCreateUpdateProperties
  5570  	}
  5571  	if mddcup.Location != nil {
  5572  		objectMap["location"] = mddcup.Location
  5573  	}
  5574  	if mddcup.Tags != nil {
  5575  		objectMap["tags"] = mddcup.Tags
  5576  	}
  5577  	return json.Marshal(objectMap)
  5578  }
  5579  
  5580  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseCreateUpdateParameters struct.
  5581  func (mddcup *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  5582  	var m map[string]*json.RawMessage
  5583  	err := json.Unmarshal(body, &m)
  5584  	if err != nil {
  5585  		return err
  5586  	}
  5587  	for k, v := range m {
  5588  		switch k {
  5589  		case "properties":
  5590  			if v != nil {
  5591  				var mongoDBDatabaseCreateUpdateProperties MongoDBDatabaseCreateUpdateProperties
  5592  				err = json.Unmarshal(*v, &mongoDBDatabaseCreateUpdateProperties)
  5593  				if err != nil {
  5594  					return err
  5595  				}
  5596  				mddcup.MongoDBDatabaseCreateUpdateProperties = &mongoDBDatabaseCreateUpdateProperties
  5597  			}
  5598  		case "id":
  5599  			if v != nil {
  5600  				var ID string
  5601  				err = json.Unmarshal(*v, &ID)
  5602  				if err != nil {
  5603  					return err
  5604  				}
  5605  				mddcup.ID = &ID
  5606  			}
  5607  		case "name":
  5608  			if v != nil {
  5609  				var name string
  5610  				err = json.Unmarshal(*v, &name)
  5611  				if err != nil {
  5612  					return err
  5613  				}
  5614  				mddcup.Name = &name
  5615  			}
  5616  		case "type":
  5617  			if v != nil {
  5618  				var typeVar string
  5619  				err = json.Unmarshal(*v, &typeVar)
  5620  				if err != nil {
  5621  					return err
  5622  				}
  5623  				mddcup.Type = &typeVar
  5624  			}
  5625  		case "location":
  5626  			if v != nil {
  5627  				var location string
  5628  				err = json.Unmarshal(*v, &location)
  5629  				if err != nil {
  5630  					return err
  5631  				}
  5632  				mddcup.Location = &location
  5633  			}
  5634  		case "tags":
  5635  			if v != nil {
  5636  				var tags map[string]*string
  5637  				err = json.Unmarshal(*v, &tags)
  5638  				if err != nil {
  5639  					return err
  5640  				}
  5641  				mddcup.Tags = tags
  5642  			}
  5643  		}
  5644  	}
  5645  
  5646  	return nil
  5647  }
  5648  
  5649  // MongoDBDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB database.
  5650  type MongoDBDatabaseCreateUpdateProperties struct {
  5651  	// Resource - The standard JSON format of a MongoDB database
  5652  	Resource *MongoDBDatabaseResource `json:"resource,omitempty"`
  5653  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  5654  	Options *CreateUpdateOptions `json:"options,omitempty"`
  5655  }
  5656  
  5657  // MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database
  5658  type MongoDBDatabaseGetProperties struct {
  5659  	Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"`
  5660  	Options  *MongoDBDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  5661  }
  5662  
  5663  // MongoDBDatabaseGetPropertiesOptions ...
  5664  type MongoDBDatabaseGetPropertiesOptions struct {
  5665  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  5666  	Throughput *int32 `json:"throughput,omitempty"`
  5667  	// AutoscaleSettings - Specifies the Autoscale settings.
  5668  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  5669  }
  5670  
  5671  // MongoDBDatabaseGetPropertiesResource ...
  5672  type MongoDBDatabaseGetPropertiesResource struct {
  5673  	// ID - Name of the Cosmos DB MongoDB database
  5674  	ID *string `json:"id,omitempty"`
  5675  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  5676  	Rid *string `json:"_rid,omitempty"`
  5677  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  5678  	Ts *float64 `json:"_ts,omitempty"`
  5679  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  5680  	Etag *string `json:"_etag,omitempty"`
  5681  }
  5682  
  5683  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetPropertiesResource.
  5684  func (mddgp MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  5685  	objectMap := make(map[string]interface{})
  5686  	if mddgp.ID != nil {
  5687  		objectMap["id"] = mddgp.ID
  5688  	}
  5689  	return json.Marshal(objectMap)
  5690  }
  5691  
  5692  // MongoDBDatabaseGetResults an Azure Cosmos DB MongoDB database.
  5693  type MongoDBDatabaseGetResults struct {
  5694  	autorest.Response `json:"-"`
  5695  	// MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database
  5696  	*MongoDBDatabaseGetProperties `json:"properties,omitempty"`
  5697  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  5698  	ID *string `json:"id,omitempty"`
  5699  	// Name - READ-ONLY; The name of the ARM resource.
  5700  	Name *string `json:"name,omitempty"`
  5701  	// Type - READ-ONLY; The type of Azure resource.
  5702  	Type *string `json:"type,omitempty"`
  5703  	// Location - The location of the resource group to which the resource belongs.
  5704  	Location *string            `json:"location,omitempty"`
  5705  	Tags     map[string]*string `json:"tags"`
  5706  }
  5707  
  5708  // MarshalJSON is the custom marshaler for MongoDBDatabaseGetResults.
  5709  func (mddgr MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) {
  5710  	objectMap := make(map[string]interface{})
  5711  	if mddgr.MongoDBDatabaseGetProperties != nil {
  5712  		objectMap["properties"] = mddgr.MongoDBDatabaseGetProperties
  5713  	}
  5714  	if mddgr.Location != nil {
  5715  		objectMap["location"] = mddgr.Location
  5716  	}
  5717  	if mddgr.Tags != nil {
  5718  		objectMap["tags"] = mddgr.Tags
  5719  	}
  5720  	return json.Marshal(objectMap)
  5721  }
  5722  
  5723  // UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseGetResults struct.
  5724  func (mddgr *MongoDBDatabaseGetResults) UnmarshalJSON(body []byte) error {
  5725  	var m map[string]*json.RawMessage
  5726  	err := json.Unmarshal(body, &m)
  5727  	if err != nil {
  5728  		return err
  5729  	}
  5730  	for k, v := range m {
  5731  		switch k {
  5732  		case "properties":
  5733  			if v != nil {
  5734  				var mongoDBDatabaseGetProperties MongoDBDatabaseGetProperties
  5735  				err = json.Unmarshal(*v, &mongoDBDatabaseGetProperties)
  5736  				if err != nil {
  5737  					return err
  5738  				}
  5739  				mddgr.MongoDBDatabaseGetProperties = &mongoDBDatabaseGetProperties
  5740  			}
  5741  		case "id":
  5742  			if v != nil {
  5743  				var ID string
  5744  				err = json.Unmarshal(*v, &ID)
  5745  				if err != nil {
  5746  					return err
  5747  				}
  5748  				mddgr.ID = &ID
  5749  			}
  5750  		case "name":
  5751  			if v != nil {
  5752  				var name string
  5753  				err = json.Unmarshal(*v, &name)
  5754  				if err != nil {
  5755  					return err
  5756  				}
  5757  				mddgr.Name = &name
  5758  			}
  5759  		case "type":
  5760  			if v != nil {
  5761  				var typeVar string
  5762  				err = json.Unmarshal(*v, &typeVar)
  5763  				if err != nil {
  5764  					return err
  5765  				}
  5766  				mddgr.Type = &typeVar
  5767  			}
  5768  		case "location":
  5769  			if v != nil {
  5770  				var location string
  5771  				err = json.Unmarshal(*v, &location)
  5772  				if err != nil {
  5773  					return err
  5774  				}
  5775  				mddgr.Location = &location
  5776  			}
  5777  		case "tags":
  5778  			if v != nil {
  5779  				var tags map[string]*string
  5780  				err = json.Unmarshal(*v, &tags)
  5781  				if err != nil {
  5782  					return err
  5783  				}
  5784  				mddgr.Tags = tags
  5785  			}
  5786  		}
  5787  	}
  5788  
  5789  	return nil
  5790  }
  5791  
  5792  // MongoDBDatabaseListResult the List operation response, that contains the MongoDB databases and their
  5793  // properties.
  5794  type MongoDBDatabaseListResult struct {
  5795  	autorest.Response `json:"-"`
  5796  	// Value - READ-ONLY; List of MongoDB databases and their properties.
  5797  	Value *[]MongoDBDatabaseGetResults `json:"value,omitempty"`
  5798  }
  5799  
  5800  // MarshalJSON is the custom marshaler for MongoDBDatabaseListResult.
  5801  func (mddlr MongoDBDatabaseListResult) MarshalJSON() ([]byte, error) {
  5802  	objectMap := make(map[string]interface{})
  5803  	return json.Marshal(objectMap)
  5804  }
  5805  
  5806  // MongoDBDatabaseResource cosmos DB MongoDB database resource object
  5807  type MongoDBDatabaseResource struct {
  5808  	// ID - Name of the Cosmos DB MongoDB database
  5809  	ID *string `json:"id,omitempty"`
  5810  }
  5811  
  5812  // MongoDBResourcesCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the
  5813  // results of a long-running operation.
  5814  type MongoDBResourcesCreateUpdateMongoDBCollectionFuture struct {
  5815  	azure.FutureAPI
  5816  	// Result returns the result of the asynchronous operation.
  5817  	// If the operation has not completed it will return an error.
  5818  	Result func(MongoDBResourcesClient) (MongoDBCollectionGetResults, error)
  5819  }
  5820  
  5821  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5822  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  5823  	var azFuture azure.Future
  5824  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5825  		return err
  5826  	}
  5827  	future.FutureAPI = &azFuture
  5828  	future.Result = future.result
  5829  	return nil
  5830  }
  5831  
  5832  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBCollectionFuture.Result.
  5833  func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) result(client MongoDBResourcesClient) (mdcgr MongoDBCollectionGetResults, err error) {
  5834  	var done bool
  5835  	done, err = future.DoneWithContext(context.Background(), client)
  5836  	if err != nil {
  5837  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  5838  		return
  5839  	}
  5840  	if !done {
  5841  		mdcgr.Response.Response = future.Response()
  5842  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture")
  5843  		return
  5844  	}
  5845  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5846  	if mdcgr.Response.Response, err = future.GetResult(sender); err == nil && mdcgr.Response.Response.StatusCode != http.StatusNoContent {
  5847  		mdcgr, err = client.CreateUpdateMongoDBCollectionResponder(mdcgr.Response.Response)
  5848  		if err != nil {
  5849  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", mdcgr.Response.Response, "Failure responding to request")
  5850  		}
  5851  	}
  5852  	return
  5853  }
  5854  
  5855  // MongoDBResourcesCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the
  5856  // results of a long-running operation.
  5857  type MongoDBResourcesCreateUpdateMongoDBDatabaseFuture struct {
  5858  	azure.FutureAPI
  5859  	// Result returns the result of the asynchronous operation.
  5860  	// If the operation has not completed it will return an error.
  5861  	Result func(MongoDBResourcesClient) (MongoDBDatabaseGetResults, error)
  5862  }
  5863  
  5864  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5865  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  5866  	var azFuture azure.Future
  5867  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5868  		return err
  5869  	}
  5870  	future.FutureAPI = &azFuture
  5871  	future.Result = future.result
  5872  	return nil
  5873  }
  5874  
  5875  // result is the default implementation for MongoDBResourcesCreateUpdateMongoDBDatabaseFuture.Result.
  5876  func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (mddgr MongoDBDatabaseGetResults, err error) {
  5877  	var done bool
  5878  	done, err = future.DoneWithContext(context.Background(), client)
  5879  	if err != nil {
  5880  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  5881  		return
  5882  	}
  5883  	if !done {
  5884  		mddgr.Response.Response = future.Response()
  5885  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture")
  5886  		return
  5887  	}
  5888  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5889  	if mddgr.Response.Response, err = future.GetResult(sender); err == nil && mddgr.Response.Response.StatusCode != http.StatusNoContent {
  5890  		mddgr, err = client.CreateUpdateMongoDBDatabaseResponder(mddgr.Response.Response)
  5891  		if err != nil {
  5892  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", mddgr.Response.Response, "Failure responding to request")
  5893  		}
  5894  	}
  5895  	return
  5896  }
  5897  
  5898  // MongoDBResourcesDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results
  5899  // of a long-running operation.
  5900  type MongoDBResourcesDeleteMongoDBCollectionFuture struct {
  5901  	azure.FutureAPI
  5902  	// Result returns the result of the asynchronous operation.
  5903  	// If the operation has not completed it will return an error.
  5904  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  5905  }
  5906  
  5907  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5908  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) UnmarshalJSON(body []byte) error {
  5909  	var azFuture azure.Future
  5910  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5911  		return err
  5912  	}
  5913  	future.FutureAPI = &azFuture
  5914  	future.Result = future.result
  5915  	return nil
  5916  }
  5917  
  5918  // result is the default implementation for MongoDBResourcesDeleteMongoDBCollectionFuture.Result.
  5919  func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  5920  	var done bool
  5921  	done, err = future.DoneWithContext(context.Background(), client)
  5922  	if err != nil {
  5923  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
  5924  		return
  5925  	}
  5926  	if !done {
  5927  		ar.Response = future.Response()
  5928  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture")
  5929  		return
  5930  	}
  5931  	ar.Response = future.Response()
  5932  	return
  5933  }
  5934  
  5935  // MongoDBResourcesDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of
  5936  // a long-running operation.
  5937  type MongoDBResourcesDeleteMongoDBDatabaseFuture struct {
  5938  	azure.FutureAPI
  5939  	// Result returns the result of the asynchronous operation.
  5940  	// If the operation has not completed it will return an error.
  5941  	Result func(MongoDBResourcesClient) (autorest.Response, error)
  5942  }
  5943  
  5944  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5945  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) UnmarshalJSON(body []byte) error {
  5946  	var azFuture azure.Future
  5947  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5948  		return err
  5949  	}
  5950  	future.FutureAPI = &azFuture
  5951  	future.Result = future.result
  5952  	return nil
  5953  }
  5954  
  5955  // result is the default implementation for MongoDBResourcesDeleteMongoDBDatabaseFuture.Result.
  5956  func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) result(client MongoDBResourcesClient) (ar autorest.Response, err error) {
  5957  	var done bool
  5958  	done, err = future.DoneWithContext(context.Background(), client)
  5959  	if err != nil {
  5960  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
  5961  		return
  5962  	}
  5963  	if !done {
  5964  		ar.Response = future.Response()
  5965  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture")
  5966  		return
  5967  	}
  5968  	ar.Response = future.Response()
  5969  	return
  5970  }
  5971  
  5972  // MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture an abstraction for monitoring and retrieving
  5973  // the results of a long-running operation.
  5974  type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture struct {
  5975  	azure.FutureAPI
  5976  	// Result returns the result of the asynchronous operation.
  5977  	// If the operation has not completed it will return an error.
  5978  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  5979  }
  5980  
  5981  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  5982  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  5983  	var azFuture azure.Future
  5984  	if err := json.Unmarshal(body, &azFuture); err != nil {
  5985  		return err
  5986  	}
  5987  	future.FutureAPI = &azFuture
  5988  	future.Result = future.result
  5989  	return nil
  5990  }
  5991  
  5992  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture.Result.
  5993  func (future *MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  5994  	var done bool
  5995  	done, err = future.DoneWithContext(context.Background(), client)
  5996  	if err != nil {
  5997  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  5998  		return
  5999  	}
  6000  	if !done {
  6001  		tsgr.Response.Response = future.Response()
  6002  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture")
  6003  		return
  6004  	}
  6005  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6006  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6007  		tsgr, err = client.MigrateMongoDBCollectionToAutoscaleResponder(tsgr.Response.Response)
  6008  		if err != nil {
  6009  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6010  		}
  6011  	}
  6012  	return
  6013  }
  6014  
  6015  // MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture an abstraction for monitoring and
  6016  // retrieving the results of a long-running operation.
  6017  type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture struct {
  6018  	azure.FutureAPI
  6019  	// Result returns the result of the asynchronous operation.
  6020  	// If the operation has not completed it will return an error.
  6021  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6022  }
  6023  
  6024  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6025  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6026  	var azFuture azure.Future
  6027  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6028  		return err
  6029  	}
  6030  	future.FutureAPI = &azFuture
  6031  	future.Result = future.result
  6032  	return nil
  6033  }
  6034  
  6035  // result is the default implementation for MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture.Result.
  6036  func (future *MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6037  	var done bool
  6038  	done, err = future.DoneWithContext(context.Background(), client)
  6039  	if err != nil {
  6040  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6041  		return
  6042  	}
  6043  	if !done {
  6044  		tsgr.Response.Response = future.Response()
  6045  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture")
  6046  		return
  6047  	}
  6048  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6049  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6050  		tsgr, err = client.MigrateMongoDBCollectionToManualThroughputResponder(tsgr.Response.Response)
  6051  		if err != nil {
  6052  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBCollectionToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6053  		}
  6054  	}
  6055  	return
  6056  }
  6057  
  6058  // MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the
  6059  // results of a long-running operation.
  6060  type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture struct {
  6061  	azure.FutureAPI
  6062  	// Result returns the result of the asynchronous operation.
  6063  	// If the operation has not completed it will return an error.
  6064  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6065  }
  6066  
  6067  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6068  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  6069  	var azFuture azure.Future
  6070  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6071  		return err
  6072  	}
  6073  	future.FutureAPI = &azFuture
  6074  	future.Result = future.result
  6075  	return nil
  6076  }
  6077  
  6078  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture.Result.
  6079  func (future *MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6080  	var done bool
  6081  	done, err = future.DoneWithContext(context.Background(), client)
  6082  	if err != nil {
  6083  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  6084  		return
  6085  	}
  6086  	if !done {
  6087  		tsgr.Response.Response = future.Response()
  6088  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture")
  6089  		return
  6090  	}
  6091  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6092  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6093  		tsgr, err = client.MigrateMongoDBDatabaseToAutoscaleResponder(tsgr.Response.Response)
  6094  		if err != nil {
  6095  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6096  		}
  6097  	}
  6098  	return
  6099  }
  6100  
  6101  // MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture an abstraction for monitoring and
  6102  // retrieving the results of a long-running operation.
  6103  type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture struct {
  6104  	azure.FutureAPI
  6105  	// Result returns the result of the asynchronous operation.
  6106  	// If the operation has not completed it will return an error.
  6107  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6108  }
  6109  
  6110  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6111  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  6112  	var azFuture azure.Future
  6113  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6114  		return err
  6115  	}
  6116  	future.FutureAPI = &azFuture
  6117  	future.Result = future.result
  6118  	return nil
  6119  }
  6120  
  6121  // result is the default implementation for MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture.Result.
  6122  func (future *MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6123  	var done bool
  6124  	done, err = future.DoneWithContext(context.Background(), client)
  6125  	if err != nil {
  6126  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  6127  		return
  6128  	}
  6129  	if !done {
  6130  		tsgr.Response.Response = future.Response()
  6131  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture")
  6132  		return
  6133  	}
  6134  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6135  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6136  		tsgr, err = client.MigrateMongoDBDatabaseToManualThroughputResponder(tsgr.Response.Response)
  6137  		if err != nil {
  6138  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6139  		}
  6140  	}
  6141  	return
  6142  }
  6143  
  6144  // MongoDBResourcesRetrieveContinuousBackupInformationFuture an abstraction for monitoring and retrieving
  6145  // the results of a long-running operation.
  6146  type MongoDBResourcesRetrieveContinuousBackupInformationFuture struct {
  6147  	azure.FutureAPI
  6148  	// Result returns the result of the asynchronous operation.
  6149  	// If the operation has not completed it will return an error.
  6150  	Result func(MongoDBResourcesClient) (BackupInformation, error)
  6151  }
  6152  
  6153  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6154  func (future *MongoDBResourcesRetrieveContinuousBackupInformationFuture) UnmarshalJSON(body []byte) error {
  6155  	var azFuture azure.Future
  6156  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6157  		return err
  6158  	}
  6159  	future.FutureAPI = &azFuture
  6160  	future.Result = future.result
  6161  	return nil
  6162  }
  6163  
  6164  // result is the default implementation for MongoDBResourcesRetrieveContinuousBackupInformationFuture.Result.
  6165  func (future *MongoDBResourcesRetrieveContinuousBackupInformationFuture) result(client MongoDBResourcesClient) (bi BackupInformation, err error) {
  6166  	var done bool
  6167  	done, err = future.DoneWithContext(context.Background(), client)
  6168  	if err != nil {
  6169  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture", "Result", future.Response(), "Polling failure")
  6170  		return
  6171  	}
  6172  	if !done {
  6173  		bi.Response.Response = future.Response()
  6174  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture")
  6175  		return
  6176  	}
  6177  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6178  	if bi.Response.Response, err = future.GetResult(sender); err == nil && bi.Response.Response.StatusCode != http.StatusNoContent {
  6179  		bi, err = client.RetrieveContinuousBackupInformationResponder(bi.Response.Response)
  6180  		if err != nil {
  6181  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesRetrieveContinuousBackupInformationFuture", "Result", bi.Response.Response, "Failure responding to request")
  6182  		}
  6183  	}
  6184  	return
  6185  }
  6186  
  6187  // MongoDBResourcesUpdateMongoDBCollectionThroughputFuture an abstraction for monitoring and retrieving the
  6188  // results of a long-running operation.
  6189  type MongoDBResourcesUpdateMongoDBCollectionThroughputFuture struct {
  6190  	azure.FutureAPI
  6191  	// Result returns the result of the asynchronous operation.
  6192  	// If the operation has not completed it will return an error.
  6193  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6194  }
  6195  
  6196  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6197  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) UnmarshalJSON(body []byte) error {
  6198  	var azFuture azure.Future
  6199  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6200  		return err
  6201  	}
  6202  	future.FutureAPI = &azFuture
  6203  	future.Result = future.result
  6204  	return nil
  6205  }
  6206  
  6207  // result is the default implementation for MongoDBResourcesUpdateMongoDBCollectionThroughputFuture.Result.
  6208  func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6209  	var done bool
  6210  	done, err = future.DoneWithContext(context.Background(), client)
  6211  	if err != nil {
  6212  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", future.Response(), "Polling failure")
  6213  		return
  6214  	}
  6215  	if !done {
  6216  		tsgr.Response.Response = future.Response()
  6217  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture")
  6218  		return
  6219  	}
  6220  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6221  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6222  		tsgr, err = client.UpdateMongoDBCollectionThroughputResponder(tsgr.Response.Response)
  6223  		if err != nil {
  6224  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6225  		}
  6226  	}
  6227  	return
  6228  }
  6229  
  6230  // MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture an abstraction for monitoring and retrieving the
  6231  // results of a long-running operation.
  6232  type MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture struct {
  6233  	azure.FutureAPI
  6234  	// Result returns the result of the asynchronous operation.
  6235  	// If the operation has not completed it will return an error.
  6236  	Result func(MongoDBResourcesClient) (ThroughputSettingsGetResults, error)
  6237  }
  6238  
  6239  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6240  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  6241  	var azFuture azure.Future
  6242  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6243  		return err
  6244  	}
  6245  	future.FutureAPI = &azFuture
  6246  	future.Result = future.result
  6247  	return nil
  6248  }
  6249  
  6250  // result is the default implementation for MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture.Result.
  6251  func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  6252  	var done bool
  6253  	done, err = future.DoneWithContext(context.Background(), client)
  6254  	if err != nil {
  6255  		err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  6256  		return
  6257  	}
  6258  	if !done {
  6259  		tsgr.Response.Response = future.Response()
  6260  		err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture")
  6261  		return
  6262  	}
  6263  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6264  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  6265  		tsgr, err = client.UpdateMongoDBDatabaseThroughputResponder(tsgr.Response.Response)
  6266  		if err != nil {
  6267  			err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  6268  		}
  6269  	}
  6270  	return
  6271  }
  6272  
  6273  // MongoIndex cosmos DB MongoDB collection index key
  6274  type MongoIndex struct {
  6275  	// Key - Cosmos DB MongoDB collection index keys
  6276  	Key *MongoIndexKeys `json:"key,omitempty"`
  6277  	// Options - Cosmos DB MongoDB collection index key options
  6278  	Options *MongoIndexOptions `json:"options,omitempty"`
  6279  }
  6280  
  6281  // MongoIndexKeys cosmos DB MongoDB collection resource object
  6282  type MongoIndexKeys struct {
  6283  	// Keys - List of keys for each MongoDB collection in the Azure Cosmos DB service
  6284  	Keys *[]string `json:"keys,omitempty"`
  6285  }
  6286  
  6287  // MongoIndexOptions cosmos DB MongoDB collection index options
  6288  type MongoIndexOptions struct {
  6289  	// ExpireAfterSeconds - Expire after seconds
  6290  	ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"`
  6291  	// Unique - Is unique or not
  6292  	Unique *bool `json:"unique,omitempty"`
  6293  }
  6294  
  6295  // NotebookWorkspace a notebook workspace resource
  6296  type NotebookWorkspace struct {
  6297  	autorest.Response `json:"-"`
  6298  	// NotebookWorkspaceProperties - Resource properties.
  6299  	*NotebookWorkspaceProperties `json:"properties,omitempty"`
  6300  	// ID - READ-ONLY; The unique resource identifier of the database account.
  6301  	ID *string `json:"id,omitempty"`
  6302  	// Name - READ-ONLY; The name of the database account.
  6303  	Name *string `json:"name,omitempty"`
  6304  	// Type - READ-ONLY; The type of Azure resource.
  6305  	Type *string `json:"type,omitempty"`
  6306  }
  6307  
  6308  // MarshalJSON is the custom marshaler for NotebookWorkspace.
  6309  func (nw NotebookWorkspace) MarshalJSON() ([]byte, error) {
  6310  	objectMap := make(map[string]interface{})
  6311  	if nw.NotebookWorkspaceProperties != nil {
  6312  		objectMap["properties"] = nw.NotebookWorkspaceProperties
  6313  	}
  6314  	return json.Marshal(objectMap)
  6315  }
  6316  
  6317  // UnmarshalJSON is the custom unmarshaler for NotebookWorkspace struct.
  6318  func (nw *NotebookWorkspace) UnmarshalJSON(body []byte) error {
  6319  	var m map[string]*json.RawMessage
  6320  	err := json.Unmarshal(body, &m)
  6321  	if err != nil {
  6322  		return err
  6323  	}
  6324  	for k, v := range m {
  6325  		switch k {
  6326  		case "properties":
  6327  			if v != nil {
  6328  				var notebookWorkspaceProperties NotebookWorkspaceProperties
  6329  				err = json.Unmarshal(*v, &notebookWorkspaceProperties)
  6330  				if err != nil {
  6331  					return err
  6332  				}
  6333  				nw.NotebookWorkspaceProperties = &notebookWorkspaceProperties
  6334  			}
  6335  		case "id":
  6336  			if v != nil {
  6337  				var ID string
  6338  				err = json.Unmarshal(*v, &ID)
  6339  				if err != nil {
  6340  					return err
  6341  				}
  6342  				nw.ID = &ID
  6343  			}
  6344  		case "name":
  6345  			if v != nil {
  6346  				var name string
  6347  				err = json.Unmarshal(*v, &name)
  6348  				if err != nil {
  6349  					return err
  6350  				}
  6351  				nw.Name = &name
  6352  			}
  6353  		case "type":
  6354  			if v != nil {
  6355  				var typeVar string
  6356  				err = json.Unmarshal(*v, &typeVar)
  6357  				if err != nil {
  6358  					return err
  6359  				}
  6360  				nw.Type = &typeVar
  6361  			}
  6362  		}
  6363  	}
  6364  
  6365  	return nil
  6366  }
  6367  
  6368  // NotebookWorkspaceConnectionInfoResult the connection info for the given notebook workspace
  6369  type NotebookWorkspaceConnectionInfoResult struct {
  6370  	autorest.Response `json:"-"`
  6371  	// AuthToken - READ-ONLY; Specifies auth token used for connecting to Notebook server (uses token-based auth).
  6372  	AuthToken *string `json:"authToken,omitempty"`
  6373  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  6374  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  6375  }
  6376  
  6377  // MarshalJSON is the custom marshaler for NotebookWorkspaceConnectionInfoResult.
  6378  func (nwcir NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error) {
  6379  	objectMap := make(map[string]interface{})
  6380  	return json.Marshal(objectMap)
  6381  }
  6382  
  6383  // NotebookWorkspaceCreateUpdateParameters parameters to create a notebook workspace resource
  6384  type NotebookWorkspaceCreateUpdateParameters struct {
  6385  	// ID - READ-ONLY; The unique resource identifier of the database account.
  6386  	ID *string `json:"id,omitempty"`
  6387  	// Name - READ-ONLY; The name of the database account.
  6388  	Name *string `json:"name,omitempty"`
  6389  	// Type - READ-ONLY; The type of Azure resource.
  6390  	Type *string `json:"type,omitempty"`
  6391  }
  6392  
  6393  // MarshalJSON is the custom marshaler for NotebookWorkspaceCreateUpdateParameters.
  6394  func (nwcup NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  6395  	objectMap := make(map[string]interface{})
  6396  	return json.Marshal(objectMap)
  6397  }
  6398  
  6399  // NotebookWorkspaceListResult a list of notebook workspace resources
  6400  type NotebookWorkspaceListResult struct {
  6401  	autorest.Response `json:"-"`
  6402  	// Value - Array of notebook workspace resources
  6403  	Value *[]NotebookWorkspace `json:"value,omitempty"`
  6404  }
  6405  
  6406  // NotebookWorkspaceProperties properties of a notebook workspace resource.
  6407  type NotebookWorkspaceProperties struct {
  6408  	// NotebookServerEndpoint - READ-ONLY; Specifies the endpoint of Notebook server.
  6409  	NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty"`
  6410  	// Status - READ-ONLY; Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating.
  6411  	Status *string `json:"status,omitempty"`
  6412  }
  6413  
  6414  // MarshalJSON is the custom marshaler for NotebookWorkspaceProperties.
  6415  func (nwp NotebookWorkspaceProperties) MarshalJSON() ([]byte, error) {
  6416  	objectMap := make(map[string]interface{})
  6417  	return json.Marshal(objectMap)
  6418  }
  6419  
  6420  // NotebookWorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  6421  // long-running operation.
  6422  type NotebookWorkspacesCreateOrUpdateFuture struct {
  6423  	azure.FutureAPI
  6424  	// Result returns the result of the asynchronous operation.
  6425  	// If the operation has not completed it will return an error.
  6426  	Result func(NotebookWorkspacesClient) (NotebookWorkspace, error)
  6427  }
  6428  
  6429  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6430  func (future *NotebookWorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  6431  	var azFuture azure.Future
  6432  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6433  		return err
  6434  	}
  6435  	future.FutureAPI = &azFuture
  6436  	future.Result = future.result
  6437  	return nil
  6438  }
  6439  
  6440  // result is the default implementation for NotebookWorkspacesCreateOrUpdateFuture.Result.
  6441  func (future *NotebookWorkspacesCreateOrUpdateFuture) result(client NotebookWorkspacesClient) (nw NotebookWorkspace, err error) {
  6442  	var done bool
  6443  	done, err = future.DoneWithContext(context.Background(), client)
  6444  	if err != nil {
  6445  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  6446  		return
  6447  	}
  6448  	if !done {
  6449  		nw.Response.Response = future.Response()
  6450  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesCreateOrUpdateFuture")
  6451  		return
  6452  	}
  6453  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6454  	if nw.Response.Response, err = future.GetResult(sender); err == nil && nw.Response.Response.StatusCode != http.StatusNoContent {
  6455  		nw, err = client.CreateOrUpdateResponder(nw.Response.Response)
  6456  		if err != nil {
  6457  			err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesCreateOrUpdateFuture", "Result", nw.Response.Response, "Failure responding to request")
  6458  		}
  6459  	}
  6460  	return
  6461  }
  6462  
  6463  // NotebookWorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a
  6464  // long-running operation.
  6465  type NotebookWorkspacesDeleteFuture struct {
  6466  	azure.FutureAPI
  6467  	// Result returns the result of the asynchronous operation.
  6468  	// If the operation has not completed it will return an error.
  6469  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6470  }
  6471  
  6472  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6473  func (future *NotebookWorkspacesDeleteFuture) UnmarshalJSON(body []byte) error {
  6474  	var azFuture azure.Future
  6475  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6476  		return err
  6477  	}
  6478  	future.FutureAPI = &azFuture
  6479  	future.Result = future.result
  6480  	return nil
  6481  }
  6482  
  6483  // result is the default implementation for NotebookWorkspacesDeleteFuture.Result.
  6484  func (future *NotebookWorkspacesDeleteFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  6485  	var done bool
  6486  	done, err = future.DoneWithContext(context.Background(), client)
  6487  	if err != nil {
  6488  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesDeleteFuture", "Result", future.Response(), "Polling failure")
  6489  		return
  6490  	}
  6491  	if !done {
  6492  		ar.Response = future.Response()
  6493  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesDeleteFuture")
  6494  		return
  6495  	}
  6496  	ar.Response = future.Response()
  6497  	return
  6498  }
  6499  
  6500  // NotebookWorkspacesRegenerateAuthTokenFuture an abstraction for monitoring and retrieving the results of
  6501  // a long-running operation.
  6502  type NotebookWorkspacesRegenerateAuthTokenFuture struct {
  6503  	azure.FutureAPI
  6504  	// Result returns the result of the asynchronous operation.
  6505  	// If the operation has not completed it will return an error.
  6506  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6507  }
  6508  
  6509  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6510  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) UnmarshalJSON(body []byte) error {
  6511  	var azFuture azure.Future
  6512  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6513  		return err
  6514  	}
  6515  	future.FutureAPI = &azFuture
  6516  	future.Result = future.result
  6517  	return nil
  6518  }
  6519  
  6520  // result is the default implementation for NotebookWorkspacesRegenerateAuthTokenFuture.Result.
  6521  func (future *NotebookWorkspacesRegenerateAuthTokenFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  6522  	var done bool
  6523  	done, err = future.DoneWithContext(context.Background(), client)
  6524  	if err != nil {
  6525  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesRegenerateAuthTokenFuture", "Result", future.Response(), "Polling failure")
  6526  		return
  6527  	}
  6528  	if !done {
  6529  		ar.Response = future.Response()
  6530  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesRegenerateAuthTokenFuture")
  6531  		return
  6532  	}
  6533  	ar.Response = future.Response()
  6534  	return
  6535  }
  6536  
  6537  // NotebookWorkspacesStartFuture an abstraction for monitoring and retrieving the results of a long-running
  6538  // operation.
  6539  type NotebookWorkspacesStartFuture struct {
  6540  	azure.FutureAPI
  6541  	// Result returns the result of the asynchronous operation.
  6542  	// If the operation has not completed it will return an error.
  6543  	Result func(NotebookWorkspacesClient) (autorest.Response, error)
  6544  }
  6545  
  6546  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  6547  func (future *NotebookWorkspacesStartFuture) UnmarshalJSON(body []byte) error {
  6548  	var azFuture azure.Future
  6549  	if err := json.Unmarshal(body, &azFuture); err != nil {
  6550  		return err
  6551  	}
  6552  	future.FutureAPI = &azFuture
  6553  	future.Result = future.result
  6554  	return nil
  6555  }
  6556  
  6557  // result is the default implementation for NotebookWorkspacesStartFuture.Result.
  6558  func (future *NotebookWorkspacesStartFuture) result(client NotebookWorkspacesClient) (ar autorest.Response, err error) {
  6559  	var done bool
  6560  	done, err = future.DoneWithContext(context.Background(), client)
  6561  	if err != nil {
  6562  		err = autorest.NewErrorWithError(err, "documentdb.NotebookWorkspacesStartFuture", "Result", future.Response(), "Polling failure")
  6563  		return
  6564  	}
  6565  	if !done {
  6566  		ar.Response = future.Response()
  6567  		err = azure.NewAsyncOpIncompleteError("documentdb.NotebookWorkspacesStartFuture")
  6568  		return
  6569  	}
  6570  	ar.Response = future.Response()
  6571  	return
  6572  }
  6573  
  6574  // Operation REST API operation
  6575  type Operation struct {
  6576  	// Name - Operation name: {provider}/{resource}/{operation}
  6577  	Name *string `json:"name,omitempty"`
  6578  	// Display - The object that represents the operation.
  6579  	Display *OperationDisplay `json:"display,omitempty"`
  6580  }
  6581  
  6582  // OperationDisplay the object that represents the operation.
  6583  type OperationDisplay struct {
  6584  	// Provider - Service provider: Microsoft.ResourceProvider
  6585  	Provider *string `json:"Provider,omitempty"`
  6586  	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
  6587  	Resource *string `json:"Resource,omitempty"`
  6588  	// Operation - Operation type: Read, write, delete, etc.
  6589  	Operation *string `json:"Operation,omitempty"`
  6590  	// Description - Description of operation
  6591  	Description *string `json:"Description,omitempty"`
  6592  }
  6593  
  6594  // OperationListResult result of the request to list Resource Provider operations. It contains a list of
  6595  // operations and a URL link to get the next set of results.
  6596  type OperationListResult struct {
  6597  	autorest.Response `json:"-"`
  6598  	// Value - List of operations supported by the Resource Provider.
  6599  	Value *[]Operation `json:"value,omitempty"`
  6600  	// NextLink - URL to get the next set of operation list results if there are any.
  6601  	NextLink *string `json:"nextLink,omitempty"`
  6602  }
  6603  
  6604  // OperationListResultIterator provides access to a complete listing of Operation values.
  6605  type OperationListResultIterator struct {
  6606  	i    int
  6607  	page OperationListResultPage
  6608  }
  6609  
  6610  // NextWithContext advances to the next value.  If there was an error making
  6611  // the request the iterator does not advance and the error is returned.
  6612  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  6613  	if tracing.IsEnabled() {
  6614  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  6615  		defer func() {
  6616  			sc := -1
  6617  			if iter.Response().Response.Response != nil {
  6618  				sc = iter.Response().Response.Response.StatusCode
  6619  			}
  6620  			tracing.EndSpan(ctx, sc, err)
  6621  		}()
  6622  	}
  6623  	iter.i++
  6624  	if iter.i < len(iter.page.Values()) {
  6625  		return nil
  6626  	}
  6627  	err = iter.page.NextWithContext(ctx)
  6628  	if err != nil {
  6629  		iter.i--
  6630  		return err
  6631  	}
  6632  	iter.i = 0
  6633  	return nil
  6634  }
  6635  
  6636  // Next advances to the next value.  If there was an error making
  6637  // the request the iterator does not advance and the error is returned.
  6638  // Deprecated: Use NextWithContext() instead.
  6639  func (iter *OperationListResultIterator) Next() error {
  6640  	return iter.NextWithContext(context.Background())
  6641  }
  6642  
  6643  // NotDone returns true if the enumeration should be started or is not yet complete.
  6644  func (iter OperationListResultIterator) NotDone() bool {
  6645  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6646  }
  6647  
  6648  // Response returns the raw server response from the last page request.
  6649  func (iter OperationListResultIterator) Response() OperationListResult {
  6650  	return iter.page.Response()
  6651  }
  6652  
  6653  // Value returns the current value or a zero-initialized value if the
  6654  // iterator has advanced beyond the end of the collection.
  6655  func (iter OperationListResultIterator) Value() Operation {
  6656  	if !iter.page.NotDone() {
  6657  		return Operation{}
  6658  	}
  6659  	return iter.page.Values()[iter.i]
  6660  }
  6661  
  6662  // Creates a new instance of the OperationListResultIterator type.
  6663  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  6664  	return OperationListResultIterator{page: page}
  6665  }
  6666  
  6667  // IsEmpty returns true if the ListResult contains no values.
  6668  func (olr OperationListResult) IsEmpty() bool {
  6669  	return olr.Value == nil || len(*olr.Value) == 0
  6670  }
  6671  
  6672  // hasNextLink returns true if the NextLink is not empty.
  6673  func (olr OperationListResult) hasNextLink() bool {
  6674  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  6675  }
  6676  
  6677  // operationListResultPreparer prepares a request to retrieve the next set of results.
  6678  // It returns nil if no more results exist.
  6679  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  6680  	if !olr.hasNextLink() {
  6681  		return nil, nil
  6682  	}
  6683  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6684  		autorest.AsJSON(),
  6685  		autorest.AsGet(),
  6686  		autorest.WithBaseURL(to.String(olr.NextLink)))
  6687  }
  6688  
  6689  // OperationListResultPage contains a page of Operation values.
  6690  type OperationListResultPage struct {
  6691  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  6692  	olr OperationListResult
  6693  }
  6694  
  6695  // NextWithContext advances to the next page of values.  If there was an error making
  6696  // the request the page does not advance and the error is returned.
  6697  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  6698  	if tracing.IsEnabled() {
  6699  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  6700  		defer func() {
  6701  			sc := -1
  6702  			if page.Response().Response.Response != nil {
  6703  				sc = page.Response().Response.Response.StatusCode
  6704  			}
  6705  			tracing.EndSpan(ctx, sc, err)
  6706  		}()
  6707  	}
  6708  	for {
  6709  		next, err := page.fn(ctx, page.olr)
  6710  		if err != nil {
  6711  			return err
  6712  		}
  6713  		page.olr = next
  6714  		if !next.hasNextLink() || !next.IsEmpty() {
  6715  			break
  6716  		}
  6717  	}
  6718  	return nil
  6719  }
  6720  
  6721  // Next advances to the next page of values.  If there was an error making
  6722  // the request the page does not advance and the error is returned.
  6723  // Deprecated: Use NextWithContext() instead.
  6724  func (page *OperationListResultPage) Next() error {
  6725  	return page.NextWithContext(context.Background())
  6726  }
  6727  
  6728  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6729  func (page OperationListResultPage) NotDone() bool {
  6730  	return !page.olr.IsEmpty()
  6731  }
  6732  
  6733  // Response returns the raw server response from the last page request.
  6734  func (page OperationListResultPage) Response() OperationListResult {
  6735  	return page.olr
  6736  }
  6737  
  6738  // Values returns the slice of values for the current page or nil if there are no values.
  6739  func (page OperationListResultPage) Values() []Operation {
  6740  	if page.olr.IsEmpty() {
  6741  		return nil
  6742  	}
  6743  	return *page.olr.Value
  6744  }
  6745  
  6746  // Creates a new instance of the OperationListResultPage type.
  6747  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  6748  	return OperationListResultPage{
  6749  		fn:  getNextPage,
  6750  		olr: cur,
  6751  	}
  6752  }
  6753  
  6754  // OptionsResource cosmos DB options resource object
  6755  type OptionsResource struct {
  6756  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  6757  	Throughput *int32 `json:"throughput,omitempty"`
  6758  	// AutoscaleSettings - Specifies the Autoscale settings.
  6759  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  6760  }
  6761  
  6762  // PartitionMetric the metric values for a single partition.
  6763  type PartitionMetric struct {
  6764  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the metric values.
  6765  	PartitionID *string `json:"partitionId,omitempty"`
  6766  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the metric values.
  6767  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  6768  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  6769  	StartTime *date.Time `json:"startTime,omitempty"`
  6770  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  6771  	EndTime *date.Time `json:"endTime,omitempty"`
  6772  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  6773  	TimeGrain *string `json:"timeGrain,omitempty"`
  6774  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  6775  	Unit UnitType `json:"unit,omitempty"`
  6776  	// Name - READ-ONLY; The name information for the metric.
  6777  	Name *MetricName `json:"name,omitempty"`
  6778  	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
  6779  	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
  6780  }
  6781  
  6782  // MarshalJSON is the custom marshaler for PartitionMetric.
  6783  func (pm PartitionMetric) MarshalJSON() ([]byte, error) {
  6784  	objectMap := make(map[string]interface{})
  6785  	if pm.Unit != "" {
  6786  		objectMap["unit"] = pm.Unit
  6787  	}
  6788  	return json.Marshal(objectMap)
  6789  }
  6790  
  6791  // PartitionMetricListResult the response to a list partition metrics request.
  6792  type PartitionMetricListResult struct {
  6793  	autorest.Response `json:"-"`
  6794  	// Value - READ-ONLY; The list of partition-level metrics for the account.
  6795  	Value *[]PartitionMetric `json:"value,omitempty"`
  6796  }
  6797  
  6798  // MarshalJSON is the custom marshaler for PartitionMetricListResult.
  6799  func (pmlr PartitionMetricListResult) MarshalJSON() ([]byte, error) {
  6800  	objectMap := make(map[string]interface{})
  6801  	return json.Marshal(objectMap)
  6802  }
  6803  
  6804  // PartitionUsage the partition level usage data for a usage request.
  6805  type PartitionUsage struct {
  6806  	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the usages.
  6807  	PartitionID *string `json:"partitionId,omitempty"`
  6808  	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the usages.
  6809  	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
  6810  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  6811  	Unit UnitType `json:"unit,omitempty"`
  6812  	// Name - READ-ONLY; The name information for the metric.
  6813  	Name *MetricName `json:"name,omitempty"`
  6814  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
  6815  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
  6816  	// Limit - READ-ONLY; Maximum value for this metric
  6817  	Limit *int64 `json:"limit,omitempty"`
  6818  	// CurrentValue - READ-ONLY; Current value for this metric
  6819  	CurrentValue *int64 `json:"currentValue,omitempty"`
  6820  }
  6821  
  6822  // MarshalJSON is the custom marshaler for PartitionUsage.
  6823  func (pu PartitionUsage) MarshalJSON() ([]byte, error) {
  6824  	objectMap := make(map[string]interface{})
  6825  	if pu.Unit != "" {
  6826  		objectMap["unit"] = pu.Unit
  6827  	}
  6828  	return json.Marshal(objectMap)
  6829  }
  6830  
  6831  // PartitionUsagesResult the response to a list partition level usage request.
  6832  type PartitionUsagesResult struct {
  6833  	autorest.Response `json:"-"`
  6834  	// Value - READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric
  6835  	Value *[]PartitionUsage `json:"value,omitempty"`
  6836  }
  6837  
  6838  // MarshalJSON is the custom marshaler for PartitionUsagesResult.
  6839  func (pur PartitionUsagesResult) MarshalJSON() ([]byte, error) {
  6840  	objectMap := make(map[string]interface{})
  6841  	return json.Marshal(objectMap)
  6842  }
  6843  
  6844  // PercentileMetric percentile Metric data
  6845  type PercentileMetric struct {
  6846  	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
  6847  	StartTime *date.Time `json:"startTime,omitempty"`
  6848  	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
  6849  	EndTime *date.Time `json:"endTime,omitempty"`
  6850  	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
  6851  	TimeGrain *string `json:"timeGrain,omitempty"`
  6852  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
  6853  	Unit UnitType `json:"unit,omitempty"`
  6854  	// Name - READ-ONLY; The name information for the metric.
  6855  	Name *MetricName `json:"name,omitempty"`
  6856  	// MetricValues - READ-ONLY; The percentile metric values for the specified time window and timestep.
  6857  	MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"`
  6858  }
  6859  
  6860  // MarshalJSON is the custom marshaler for PercentileMetric.
  6861  func (pm PercentileMetric) MarshalJSON() ([]byte, error) {
  6862  	objectMap := make(map[string]interface{})
  6863  	if pm.Unit != "" {
  6864  		objectMap["unit"] = pm.Unit
  6865  	}
  6866  	return json.Marshal(objectMap)
  6867  }
  6868  
  6869  // PercentileMetricListResult the response to a list percentile metrics request.
  6870  type PercentileMetricListResult struct {
  6871  	autorest.Response `json:"-"`
  6872  	// Value - READ-ONLY; The list of percentile metrics for the account.
  6873  	Value *[]PercentileMetric `json:"value,omitempty"`
  6874  }
  6875  
  6876  // MarshalJSON is the custom marshaler for PercentileMetricListResult.
  6877  func (pmlr PercentileMetricListResult) MarshalJSON() ([]byte, error) {
  6878  	objectMap := make(map[string]interface{})
  6879  	return json.Marshal(objectMap)
  6880  }
  6881  
  6882  // PercentileMetricValue represents percentile metrics values.
  6883  type PercentileMetricValue struct {
  6884  	// P10 - READ-ONLY; The 10th percentile value for the metric.
  6885  	P10 *float64 `json:"P10,omitempty"`
  6886  	// P25 - READ-ONLY; The 25th percentile value for the metric.
  6887  	P25 *float64 `json:"P25,omitempty"`
  6888  	// P50 - READ-ONLY; The 50th percentile value for the metric.
  6889  	P50 *float64 `json:"P50,omitempty"`
  6890  	// P75 - READ-ONLY; The 75th percentile value for the metric.
  6891  	P75 *float64 `json:"P75,omitempty"`
  6892  	// P90 - READ-ONLY; The 90th percentile value for the metric.
  6893  	P90 *float64 `json:"P90,omitempty"`
  6894  	// P95 - READ-ONLY; The 95th percentile value for the metric.
  6895  	P95 *float64 `json:"P95,omitempty"`
  6896  	// P99 - READ-ONLY; The 99th percentile value for the metric.
  6897  	P99 *float64 `json:"P99,omitempty"`
  6898  	// Count - READ-ONLY; The number of values for the metric.
  6899  	Count *float64 `json:"_count,omitempty"`
  6900  	// Average - READ-ONLY; The average value of the metric.
  6901  	Average *float64 `json:"average,omitempty"`
  6902  	// Maximum - READ-ONLY; The max value of the metric.
  6903  	Maximum *float64 `json:"maximum,omitempty"`
  6904  	// Minimum - READ-ONLY; The min value of the metric.
  6905  	Minimum *float64 `json:"minimum,omitempty"`
  6906  	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
  6907  	Timestamp *date.Time `json:"timestamp,omitempty"`
  6908  	// Total - READ-ONLY; The total value of the metric.
  6909  	Total *float64 `json:"total,omitempty"`
  6910  }
  6911  
  6912  // MarshalJSON is the custom marshaler for PercentileMetricValue.
  6913  func (pmv PercentileMetricValue) MarshalJSON() ([]byte, error) {
  6914  	objectMap := make(map[string]interface{})
  6915  	return json.Marshal(objectMap)
  6916  }
  6917  
  6918  // PeriodicModeBackupPolicy the object representing periodic mode backup policy.
  6919  type PeriodicModeBackupPolicy struct {
  6920  	// PeriodicModeProperties - Configuration values for periodic mode backup
  6921  	PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"`
  6922  	// MigrationState - The object representing the state of the migration between the backup policies.
  6923  	MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"`
  6924  	// Type - Possible values include: 'TypeBackupPolicy', 'TypePeriodic', 'TypeContinuous'
  6925  	Type Type `json:"type,omitempty"`
  6926  }
  6927  
  6928  // MarshalJSON is the custom marshaler for PeriodicModeBackupPolicy.
  6929  func (pmbp PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) {
  6930  	pmbp.Type = TypePeriodic
  6931  	objectMap := make(map[string]interface{})
  6932  	if pmbp.PeriodicModeProperties != nil {
  6933  		objectMap["periodicModeProperties"] = pmbp.PeriodicModeProperties
  6934  	}
  6935  	if pmbp.MigrationState != nil {
  6936  		objectMap["migrationState"] = pmbp.MigrationState
  6937  	}
  6938  	if pmbp.Type != "" {
  6939  		objectMap["type"] = pmbp.Type
  6940  	}
  6941  	return json.Marshal(objectMap)
  6942  }
  6943  
  6944  // AsPeriodicModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  6945  func (pmbp PeriodicModeBackupPolicy) AsPeriodicModeBackupPolicy() (*PeriodicModeBackupPolicy, bool) {
  6946  	return &pmbp, true
  6947  }
  6948  
  6949  // AsContinuousModeBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  6950  func (pmbp PeriodicModeBackupPolicy) AsContinuousModeBackupPolicy() (*ContinuousModeBackupPolicy, bool) {
  6951  	return nil, false
  6952  }
  6953  
  6954  // AsBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  6955  func (pmbp PeriodicModeBackupPolicy) AsBackupPolicy() (*BackupPolicy, bool) {
  6956  	return nil, false
  6957  }
  6958  
  6959  // AsBasicBackupPolicy is the BasicBackupPolicy implementation for PeriodicModeBackupPolicy.
  6960  func (pmbp PeriodicModeBackupPolicy) AsBasicBackupPolicy() (BasicBackupPolicy, bool) {
  6961  	return &pmbp, true
  6962  }
  6963  
  6964  // PeriodicModeProperties configuration values for periodic mode backup
  6965  type PeriodicModeProperties struct {
  6966  	// BackupIntervalInMinutes - An integer representing the interval in minutes between two backups
  6967  	BackupIntervalInMinutes *int32 `json:"backupIntervalInMinutes,omitempty"`
  6968  	// BackupRetentionIntervalInHours - An integer representing the time (in hours) that each backup is retained
  6969  	BackupRetentionIntervalInHours *int32 `json:"backupRetentionIntervalInHours,omitempty"`
  6970  	// BackupStorageRedundancy - Enum to indicate type of backup residency. Possible values include: 'BackupStorageRedundancyGeo', 'BackupStorageRedundancyLocal', 'BackupStorageRedundancyZone'
  6971  	BackupStorageRedundancy BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty"`
  6972  }
  6973  
  6974  // Permission the set of data plane operations permitted through this Role Definition.
  6975  type Permission struct {
  6976  	// DataActions - An array of data actions that are allowed.
  6977  	DataActions *[]string `json:"dataActions,omitempty"`
  6978  	// NotDataActions - An array of data actions that are denied.
  6979  	NotDataActions *[]string `json:"notDataActions,omitempty"`
  6980  }
  6981  
  6982  // PrivateEndpointConnection a private endpoint connection
  6983  type PrivateEndpointConnection struct {
  6984  	autorest.Response `json:"-"`
  6985  	// PrivateEndpointConnectionProperties - Resource properties.
  6986  	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
  6987  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  6988  	ID *string `json:"id,omitempty"`
  6989  	// Name - READ-ONLY; The name of the resource
  6990  	Name *string `json:"name,omitempty"`
  6991  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  6992  	Type *string `json:"type,omitempty"`
  6993  }
  6994  
  6995  // MarshalJSON is the custom marshaler for PrivateEndpointConnection.
  6996  func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
  6997  	objectMap := make(map[string]interface{})
  6998  	if pec.PrivateEndpointConnectionProperties != nil {
  6999  		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
  7000  	}
  7001  	return json.Marshal(objectMap)
  7002  }
  7003  
  7004  // UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
  7005  func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
  7006  	var m map[string]*json.RawMessage
  7007  	err := json.Unmarshal(body, &m)
  7008  	if err != nil {
  7009  		return err
  7010  	}
  7011  	for k, v := range m {
  7012  		switch k {
  7013  		case "properties":
  7014  			if v != nil {
  7015  				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
  7016  				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
  7017  				if err != nil {
  7018  					return err
  7019  				}
  7020  				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
  7021  			}
  7022  		case "id":
  7023  			if v != nil {
  7024  				var ID string
  7025  				err = json.Unmarshal(*v, &ID)
  7026  				if err != nil {
  7027  					return err
  7028  				}
  7029  				pec.ID = &ID
  7030  			}
  7031  		case "name":
  7032  			if v != nil {
  7033  				var name string
  7034  				err = json.Unmarshal(*v, &name)
  7035  				if err != nil {
  7036  					return err
  7037  				}
  7038  				pec.Name = &name
  7039  			}
  7040  		case "type":
  7041  			if v != nil {
  7042  				var typeVar string
  7043  				err = json.Unmarshal(*v, &typeVar)
  7044  				if err != nil {
  7045  					return err
  7046  				}
  7047  				pec.Type = &typeVar
  7048  			}
  7049  		}
  7050  	}
  7051  
  7052  	return nil
  7053  }
  7054  
  7055  // PrivateEndpointConnectionListResult a list of private endpoint connections
  7056  type PrivateEndpointConnectionListResult struct {
  7057  	autorest.Response `json:"-"`
  7058  	// Value - Array of private endpoint connections
  7059  	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
  7060  }
  7061  
  7062  // PrivateEndpointConnectionProperties properties of a private endpoint connection.
  7063  type PrivateEndpointConnectionProperties struct {
  7064  	// PrivateEndpoint - Private endpoint which the connection belongs to.
  7065  	PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"`
  7066  	// PrivateLinkServiceConnectionState - Connection State of the Private Endpoint Connection.
  7067  	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"`
  7068  	// GroupID - Group id of the private endpoint.
  7069  	GroupID *string `json:"groupId,omitempty"`
  7070  	// ProvisioningState - Provisioning state of the private endpoint.
  7071  	ProvisioningState *string `json:"provisioningState,omitempty"`
  7072  }
  7073  
  7074  // PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  7075  // of a long-running operation.
  7076  type PrivateEndpointConnectionsCreateOrUpdateFuture struct {
  7077  	azure.FutureAPI
  7078  	// Result returns the result of the asynchronous operation.
  7079  	// If the operation has not completed it will return an error.
  7080  	Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
  7081  }
  7082  
  7083  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7084  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  7085  	var azFuture azure.Future
  7086  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7087  		return err
  7088  	}
  7089  	future.FutureAPI = &azFuture
  7090  	future.Result = future.result
  7091  	return nil
  7092  }
  7093  
  7094  // result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result.
  7095  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) {
  7096  	var done bool
  7097  	done, err = future.DoneWithContext(context.Background(), client)
  7098  	if err != nil {
  7099  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  7100  		return
  7101  	}
  7102  	if !done {
  7103  		pec.Response.Response = future.Response()
  7104  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture")
  7105  		return
  7106  	}
  7107  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7108  	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
  7109  		pec, err = client.CreateOrUpdateResponder(pec.Response.Response)
  7110  		if err != nil {
  7111  			err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
  7112  		}
  7113  	}
  7114  	return
  7115  }
  7116  
  7117  // PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
  7118  // long-running operation.
  7119  type PrivateEndpointConnectionsDeleteFuture struct {
  7120  	azure.FutureAPI
  7121  	// Result returns the result of the asynchronous operation.
  7122  	// If the operation has not completed it will return an error.
  7123  	Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
  7124  }
  7125  
  7126  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7127  func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
  7128  	var azFuture azure.Future
  7129  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7130  		return err
  7131  	}
  7132  	future.FutureAPI = &azFuture
  7133  	future.Result = future.result
  7134  	return nil
  7135  }
  7136  
  7137  // result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
  7138  func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
  7139  	var done bool
  7140  	done, err = future.DoneWithContext(context.Background(), client)
  7141  	if err != nil {
  7142  		err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
  7143  		return
  7144  	}
  7145  	if !done {
  7146  		ar.Response = future.Response()
  7147  		err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsDeleteFuture")
  7148  		return
  7149  	}
  7150  	ar.Response = future.Response()
  7151  	return
  7152  }
  7153  
  7154  // PrivateEndpointProperty private endpoint which the connection belongs to.
  7155  type PrivateEndpointProperty struct {
  7156  	// ID - Resource id of the private endpoint.
  7157  	ID *string `json:"id,omitempty"`
  7158  }
  7159  
  7160  // PrivateLinkResource a private link resource
  7161  type PrivateLinkResource struct {
  7162  	autorest.Response `json:"-"`
  7163  	// PrivateLinkResourceProperties - Resource properties.
  7164  	*PrivateLinkResourceProperties `json:"properties,omitempty"`
  7165  	// ID - READ-ONLY; The unique resource identifier of the database account.
  7166  	ID *string `json:"id,omitempty"`
  7167  	// Name - READ-ONLY; The name of the database account.
  7168  	Name *string `json:"name,omitempty"`
  7169  	// Type - READ-ONLY; The type of Azure resource.
  7170  	Type *string `json:"type,omitempty"`
  7171  }
  7172  
  7173  // MarshalJSON is the custom marshaler for PrivateLinkResource.
  7174  func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
  7175  	objectMap := make(map[string]interface{})
  7176  	if plr.PrivateLinkResourceProperties != nil {
  7177  		objectMap["properties"] = plr.PrivateLinkResourceProperties
  7178  	}
  7179  	return json.Marshal(objectMap)
  7180  }
  7181  
  7182  // UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
  7183  func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
  7184  	var m map[string]*json.RawMessage
  7185  	err := json.Unmarshal(body, &m)
  7186  	if err != nil {
  7187  		return err
  7188  	}
  7189  	for k, v := range m {
  7190  		switch k {
  7191  		case "properties":
  7192  			if v != nil {
  7193  				var privateLinkResourceProperties PrivateLinkResourceProperties
  7194  				err = json.Unmarshal(*v, &privateLinkResourceProperties)
  7195  				if err != nil {
  7196  					return err
  7197  				}
  7198  				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
  7199  			}
  7200  		case "id":
  7201  			if v != nil {
  7202  				var ID string
  7203  				err = json.Unmarshal(*v, &ID)
  7204  				if err != nil {
  7205  					return err
  7206  				}
  7207  				plr.ID = &ID
  7208  			}
  7209  		case "name":
  7210  			if v != nil {
  7211  				var name string
  7212  				err = json.Unmarshal(*v, &name)
  7213  				if err != nil {
  7214  					return err
  7215  				}
  7216  				plr.Name = &name
  7217  			}
  7218  		case "type":
  7219  			if v != nil {
  7220  				var typeVar string
  7221  				err = json.Unmarshal(*v, &typeVar)
  7222  				if err != nil {
  7223  					return err
  7224  				}
  7225  				plr.Type = &typeVar
  7226  			}
  7227  		}
  7228  	}
  7229  
  7230  	return nil
  7231  }
  7232  
  7233  // PrivateLinkResourceListResult a list of private link resources
  7234  type PrivateLinkResourceListResult struct {
  7235  	autorest.Response `json:"-"`
  7236  	// Value - Array of private link resources
  7237  	Value *[]PrivateLinkResource `json:"value,omitempty"`
  7238  }
  7239  
  7240  // PrivateLinkResourceProperties properties of a private link resource.
  7241  type PrivateLinkResourceProperties struct {
  7242  	// GroupID - READ-ONLY; The private link resource group id.
  7243  	GroupID *string `json:"groupId,omitempty"`
  7244  	// RequiredMembers - READ-ONLY; The private link resource required member names.
  7245  	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
  7246  	// RequiredZoneNames - READ-ONLY; The private link resource required zone names.
  7247  	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
  7248  }
  7249  
  7250  // MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
  7251  func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
  7252  	objectMap := make(map[string]interface{})
  7253  	return json.Marshal(objectMap)
  7254  }
  7255  
  7256  // PrivateLinkServiceConnectionStateProperty connection State of the Private Endpoint Connection.
  7257  type PrivateLinkServiceConnectionStateProperty struct {
  7258  	// Status - The private link service connection status.
  7259  	Status *string `json:"status,omitempty"`
  7260  	// Description - The private link service connection description.
  7261  	Description *string `json:"description,omitempty"`
  7262  	// ActionsRequired - READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect)
  7263  	ActionsRequired *string `json:"actionsRequired,omitempty"`
  7264  }
  7265  
  7266  // MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionStateProperty.
  7267  func (plscsp PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) {
  7268  	objectMap := make(map[string]interface{})
  7269  	if plscsp.Status != nil {
  7270  		objectMap["status"] = plscsp.Status
  7271  	}
  7272  	if plscsp.Description != nil {
  7273  		objectMap["description"] = plscsp.Description
  7274  	}
  7275  	return json.Marshal(objectMap)
  7276  }
  7277  
  7278  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  7279  // have tags and a location
  7280  type ProxyResource struct {
  7281  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  7282  	ID *string `json:"id,omitempty"`
  7283  	// Name - READ-ONLY; The name of the resource
  7284  	Name *string `json:"name,omitempty"`
  7285  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  7286  	Type *string `json:"type,omitempty"`
  7287  }
  7288  
  7289  // MarshalJSON is the custom marshaler for ProxyResource.
  7290  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  7291  	objectMap := make(map[string]interface{})
  7292  	return json.Marshal(objectMap)
  7293  }
  7294  
  7295  // RegionForOnlineOffline cosmos DB region to online or offline.
  7296  type RegionForOnlineOffline struct {
  7297  	// Region - Cosmos DB region, with spaces between words and each word capitalized.
  7298  	Region *string `json:"region,omitempty"`
  7299  }
  7300  
  7301  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  7302  type Resource struct {
  7303  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  7304  	ID *string `json:"id,omitempty"`
  7305  	// Name - READ-ONLY; The name of the resource
  7306  	Name *string `json:"name,omitempty"`
  7307  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  7308  	Type *string `json:"type,omitempty"`
  7309  }
  7310  
  7311  // MarshalJSON is the custom marshaler for Resource.
  7312  func (r Resource) MarshalJSON() ([]byte, error) {
  7313  	objectMap := make(map[string]interface{})
  7314  	return json.Marshal(objectMap)
  7315  }
  7316  
  7317  // RestorableDatabaseAccountGetResult a Azure Cosmos DB restorable database account.
  7318  type RestorableDatabaseAccountGetResult struct {
  7319  	autorest.Response `json:"-"`
  7320  	// RestorableDatabaseAccountProperties - The properties of a restorable database account.
  7321  	*RestorableDatabaseAccountProperties `json:"properties,omitempty"`
  7322  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  7323  	ID *string `json:"id,omitempty"`
  7324  	// Name - READ-ONLY; The name of the ARM resource.
  7325  	Name *string `json:"name,omitempty"`
  7326  	// Type - READ-ONLY; The type of Azure resource.
  7327  	Type *string `json:"type,omitempty"`
  7328  	// Location - The location of the resource group to which the resource belongs.
  7329  	Location *string `json:"location,omitempty"`
  7330  }
  7331  
  7332  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountGetResult.
  7333  func (rdagr RestorableDatabaseAccountGetResult) MarshalJSON() ([]byte, error) {
  7334  	objectMap := make(map[string]interface{})
  7335  	if rdagr.RestorableDatabaseAccountProperties != nil {
  7336  		objectMap["properties"] = rdagr.RestorableDatabaseAccountProperties
  7337  	}
  7338  	if rdagr.Location != nil {
  7339  		objectMap["location"] = rdagr.Location
  7340  	}
  7341  	return json.Marshal(objectMap)
  7342  }
  7343  
  7344  // UnmarshalJSON is the custom unmarshaler for RestorableDatabaseAccountGetResult struct.
  7345  func (rdagr *RestorableDatabaseAccountGetResult) UnmarshalJSON(body []byte) error {
  7346  	var m map[string]*json.RawMessage
  7347  	err := json.Unmarshal(body, &m)
  7348  	if err != nil {
  7349  		return err
  7350  	}
  7351  	for k, v := range m {
  7352  		switch k {
  7353  		case "properties":
  7354  			if v != nil {
  7355  				var restorableDatabaseAccountProperties RestorableDatabaseAccountProperties
  7356  				err = json.Unmarshal(*v, &restorableDatabaseAccountProperties)
  7357  				if err != nil {
  7358  					return err
  7359  				}
  7360  				rdagr.RestorableDatabaseAccountProperties = &restorableDatabaseAccountProperties
  7361  			}
  7362  		case "id":
  7363  			if v != nil {
  7364  				var ID string
  7365  				err = json.Unmarshal(*v, &ID)
  7366  				if err != nil {
  7367  					return err
  7368  				}
  7369  				rdagr.ID = &ID
  7370  			}
  7371  		case "name":
  7372  			if v != nil {
  7373  				var name string
  7374  				err = json.Unmarshal(*v, &name)
  7375  				if err != nil {
  7376  					return err
  7377  				}
  7378  				rdagr.Name = &name
  7379  			}
  7380  		case "type":
  7381  			if v != nil {
  7382  				var typeVar string
  7383  				err = json.Unmarshal(*v, &typeVar)
  7384  				if err != nil {
  7385  					return err
  7386  				}
  7387  				rdagr.Type = &typeVar
  7388  			}
  7389  		case "location":
  7390  			if v != nil {
  7391  				var location string
  7392  				err = json.Unmarshal(*v, &location)
  7393  				if err != nil {
  7394  					return err
  7395  				}
  7396  				rdagr.Location = &location
  7397  			}
  7398  		}
  7399  	}
  7400  
  7401  	return nil
  7402  }
  7403  
  7404  // RestorableDatabaseAccountProperties the properties of a restorable database account.
  7405  type RestorableDatabaseAccountProperties struct {
  7406  	// AccountName - The name of the global database account
  7407  	AccountName *string `json:"accountName,omitempty"`
  7408  	// CreationTime - The creation time of the restorable database account (ISO-8601 format).
  7409  	CreationTime *date.Time `json:"creationTime,omitempty"`
  7410  	// DeletionTime - The time at which the restorable database account has been deleted (ISO-8601 format).
  7411  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  7412  	// APIType - READ-ONLY; The API type of the restorable database account. Possible values include: 'APITypeMongoDB', 'APITypeGremlin', 'APITypeCassandra', 'APITypeTable', 'APITypeSQL', 'APITypeGremlinV2'
  7413  	APIType APIType `json:"apiType,omitempty"`
  7414  	// RestorableLocations - READ-ONLY; List of regions where the of the database account can be restored from.
  7415  	RestorableLocations *[]RestorableLocationResource `json:"restorableLocations,omitempty"`
  7416  }
  7417  
  7418  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountProperties.
  7419  func (rdap RestorableDatabaseAccountProperties) MarshalJSON() ([]byte, error) {
  7420  	objectMap := make(map[string]interface{})
  7421  	if rdap.AccountName != nil {
  7422  		objectMap["accountName"] = rdap.AccountName
  7423  	}
  7424  	if rdap.CreationTime != nil {
  7425  		objectMap["creationTime"] = rdap.CreationTime
  7426  	}
  7427  	if rdap.DeletionTime != nil {
  7428  		objectMap["deletionTime"] = rdap.DeletionTime
  7429  	}
  7430  	return json.Marshal(objectMap)
  7431  }
  7432  
  7433  // RestorableDatabaseAccountsListResult the List operation response, that contains the restorable database
  7434  // accounts and their properties.
  7435  type RestorableDatabaseAccountsListResult struct {
  7436  	autorest.Response `json:"-"`
  7437  	// Value - READ-ONLY; List of restorable database accounts and their properties.
  7438  	Value *[]RestorableDatabaseAccountGetResult `json:"value,omitempty"`
  7439  }
  7440  
  7441  // MarshalJSON is the custom marshaler for RestorableDatabaseAccountsListResult.
  7442  func (rdalr RestorableDatabaseAccountsListResult) MarshalJSON() ([]byte, error) {
  7443  	objectMap := make(map[string]interface{})
  7444  	return json.Marshal(objectMap)
  7445  }
  7446  
  7447  // RestorableLocationResource properties of the regional restorable account.
  7448  type RestorableLocationResource struct {
  7449  	// LocationName - READ-ONLY; The location of the regional restorable account.
  7450  	LocationName *string `json:"locationName,omitempty"`
  7451  	// RegionalDatabaseAccountInstanceID - READ-ONLY; The instance id of the regional restorable account.
  7452  	RegionalDatabaseAccountInstanceID *string `json:"regionalDatabaseAccountInstanceId,omitempty"`
  7453  	// CreationTime - READ-ONLY; The creation time of the regional restorable database account (ISO-8601 format).
  7454  	CreationTime *date.Time `json:"creationTime,omitempty"`
  7455  	// DeletionTime - READ-ONLY; The time at which the regional restorable database account has been deleted (ISO-8601 format).
  7456  	DeletionTime *date.Time `json:"deletionTime,omitempty"`
  7457  }
  7458  
  7459  // MarshalJSON is the custom marshaler for RestorableLocationResource.
  7460  func (rlr RestorableLocationResource) MarshalJSON() ([]byte, error) {
  7461  	objectMap := make(map[string]interface{})
  7462  	return json.Marshal(objectMap)
  7463  }
  7464  
  7465  // RestorableMongodbCollectionGetResult an Azure Cosmos DB MongoDB collection event
  7466  type RestorableMongodbCollectionGetResult struct {
  7467  	// RestorableMongodbCollectionProperties - The properties of a MongoDB collection event.
  7468  	*RestorableMongodbCollectionProperties `json:"properties,omitempty"`
  7469  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  7470  	ID *string `json:"id,omitempty"`
  7471  	// Name - READ-ONLY; The name of the ARM resource.
  7472  	Name *string `json:"name,omitempty"`
  7473  	// Type - READ-ONLY; The type of Azure resource.
  7474  	Type *string `json:"type,omitempty"`
  7475  }
  7476  
  7477  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionGetResult.
  7478  func (rmcgr RestorableMongodbCollectionGetResult) MarshalJSON() ([]byte, error) {
  7479  	objectMap := make(map[string]interface{})
  7480  	if rmcgr.RestorableMongodbCollectionProperties != nil {
  7481  		objectMap["properties"] = rmcgr.RestorableMongodbCollectionProperties
  7482  	}
  7483  	return json.Marshal(objectMap)
  7484  }
  7485  
  7486  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbCollectionGetResult struct.
  7487  func (rmcgr *RestorableMongodbCollectionGetResult) UnmarshalJSON(body []byte) error {
  7488  	var m map[string]*json.RawMessage
  7489  	err := json.Unmarshal(body, &m)
  7490  	if err != nil {
  7491  		return err
  7492  	}
  7493  	for k, v := range m {
  7494  		switch k {
  7495  		case "properties":
  7496  			if v != nil {
  7497  				var restorableMongodbCollectionProperties RestorableMongodbCollectionProperties
  7498  				err = json.Unmarshal(*v, &restorableMongodbCollectionProperties)
  7499  				if err != nil {
  7500  					return err
  7501  				}
  7502  				rmcgr.RestorableMongodbCollectionProperties = &restorableMongodbCollectionProperties
  7503  			}
  7504  		case "id":
  7505  			if v != nil {
  7506  				var ID string
  7507  				err = json.Unmarshal(*v, &ID)
  7508  				if err != nil {
  7509  					return err
  7510  				}
  7511  				rmcgr.ID = &ID
  7512  			}
  7513  		case "name":
  7514  			if v != nil {
  7515  				var name string
  7516  				err = json.Unmarshal(*v, &name)
  7517  				if err != nil {
  7518  					return err
  7519  				}
  7520  				rmcgr.Name = &name
  7521  			}
  7522  		case "type":
  7523  			if v != nil {
  7524  				var typeVar string
  7525  				err = json.Unmarshal(*v, &typeVar)
  7526  				if err != nil {
  7527  					return err
  7528  				}
  7529  				rmcgr.Type = &typeVar
  7530  			}
  7531  		}
  7532  	}
  7533  
  7534  	return nil
  7535  }
  7536  
  7537  // RestorableMongodbCollectionProperties the properties of an Azure Cosmos DB MongoDB collection event
  7538  type RestorableMongodbCollectionProperties struct {
  7539  	// Resource - The resource of an Azure Cosmos DB MongoDB collection event
  7540  	Resource *RestorableMongodbCollectionPropertiesResource `json:"resource,omitempty"`
  7541  }
  7542  
  7543  // RestorableMongodbCollectionPropertiesResource the resource of an Azure Cosmos DB MongoDB collection
  7544  // event
  7545  type RestorableMongodbCollectionPropertiesResource struct {
  7546  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7547  	Rid *string `json:"_rid,omitempty"`
  7548  	// OperationType - READ-ONLY; The operation type of this collection event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  7549  	OperationType OperationType `json:"operationType,omitempty"`
  7550  	// EventTimestamp - READ-ONLY; The time when this collection event happened.
  7551  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  7552  	// OwnerID - READ-ONLY; The name of this MongoDB collection.
  7553  	OwnerID *string `json:"ownerId,omitempty"`
  7554  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB collection.
  7555  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  7556  }
  7557  
  7558  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionPropertiesResource.
  7559  func (rmcp RestorableMongodbCollectionPropertiesResource) MarshalJSON() ([]byte, error) {
  7560  	objectMap := make(map[string]interface{})
  7561  	return json.Marshal(objectMap)
  7562  }
  7563  
  7564  // RestorableMongodbCollectionsListResult the List operation response, that contains the MongoDB collection
  7565  // events and their properties.
  7566  type RestorableMongodbCollectionsListResult struct {
  7567  	autorest.Response `json:"-"`
  7568  	// Value - READ-ONLY; List of MongoDB collection events and their properties.
  7569  	Value *[]RestorableMongodbCollectionGetResult `json:"value,omitempty"`
  7570  }
  7571  
  7572  // MarshalJSON is the custom marshaler for RestorableMongodbCollectionsListResult.
  7573  func (rmclr RestorableMongodbCollectionsListResult) MarshalJSON() ([]byte, error) {
  7574  	objectMap := make(map[string]interface{})
  7575  	return json.Marshal(objectMap)
  7576  }
  7577  
  7578  // RestorableMongodbDatabaseGetResult an Azure Cosmos DB MongoDB database event
  7579  type RestorableMongodbDatabaseGetResult struct {
  7580  	// RestorableMongodbDatabaseProperties - The properties of a MongoDB database event.
  7581  	*RestorableMongodbDatabaseProperties `json:"properties,omitempty"`
  7582  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  7583  	ID *string `json:"id,omitempty"`
  7584  	// Name - READ-ONLY; The name of the ARM resource.
  7585  	Name *string `json:"name,omitempty"`
  7586  	// Type - READ-ONLY; The type of Azure resource.
  7587  	Type *string `json:"type,omitempty"`
  7588  }
  7589  
  7590  // MarshalJSON is the custom marshaler for RestorableMongodbDatabaseGetResult.
  7591  func (rmdgr RestorableMongodbDatabaseGetResult) MarshalJSON() ([]byte, error) {
  7592  	objectMap := make(map[string]interface{})
  7593  	if rmdgr.RestorableMongodbDatabaseProperties != nil {
  7594  		objectMap["properties"] = rmdgr.RestorableMongodbDatabaseProperties
  7595  	}
  7596  	return json.Marshal(objectMap)
  7597  }
  7598  
  7599  // UnmarshalJSON is the custom unmarshaler for RestorableMongodbDatabaseGetResult struct.
  7600  func (rmdgr *RestorableMongodbDatabaseGetResult) UnmarshalJSON(body []byte) error {
  7601  	var m map[string]*json.RawMessage
  7602  	err := json.Unmarshal(body, &m)
  7603  	if err != nil {
  7604  		return err
  7605  	}
  7606  	for k, v := range m {
  7607  		switch k {
  7608  		case "properties":
  7609  			if v != nil {
  7610  				var restorableMongodbDatabaseProperties RestorableMongodbDatabaseProperties
  7611  				err = json.Unmarshal(*v, &restorableMongodbDatabaseProperties)
  7612  				if err != nil {
  7613  					return err
  7614  				}
  7615  				rmdgr.RestorableMongodbDatabaseProperties = &restorableMongodbDatabaseProperties
  7616  			}
  7617  		case "id":
  7618  			if v != nil {
  7619  				var ID string
  7620  				err = json.Unmarshal(*v, &ID)
  7621  				if err != nil {
  7622  					return err
  7623  				}
  7624  				rmdgr.ID = &ID
  7625  			}
  7626  		case "name":
  7627  			if v != nil {
  7628  				var name string
  7629  				err = json.Unmarshal(*v, &name)
  7630  				if err != nil {
  7631  					return err
  7632  				}
  7633  				rmdgr.Name = &name
  7634  			}
  7635  		case "type":
  7636  			if v != nil {
  7637  				var typeVar string
  7638  				err = json.Unmarshal(*v, &typeVar)
  7639  				if err != nil {
  7640  					return err
  7641  				}
  7642  				rmdgr.Type = &typeVar
  7643  			}
  7644  		}
  7645  	}
  7646  
  7647  	return nil
  7648  }
  7649  
  7650  // RestorableMongodbDatabaseProperties the properties of an Azure Cosmos DB MongoDB database event
  7651  type RestorableMongodbDatabaseProperties struct {
  7652  	// Resource - The resource of an Azure Cosmos DB MongoDB database event
  7653  	Resource *RestorableMongodbDatabasePropertiesResource `json:"resource,omitempty"`
  7654  }
  7655  
  7656  // RestorableMongodbDatabasePropertiesResource the resource of an Azure Cosmos DB MongoDB database event
  7657  type RestorableMongodbDatabasePropertiesResource struct {
  7658  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7659  	Rid *string `json:"_rid,omitempty"`
  7660  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  7661  	OperationType OperationType `json:"operationType,omitempty"`
  7662  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  7663  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  7664  	// OwnerID - READ-ONLY; The name of this MongoDB database.
  7665  	OwnerID *string `json:"ownerId,omitempty"`
  7666  	// OwnerResourceID - READ-ONLY; The resource ID of this MongoDB database.
  7667  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  7668  }
  7669  
  7670  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasePropertiesResource.
  7671  func (rmdp RestorableMongodbDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  7672  	objectMap := make(map[string]interface{})
  7673  	return json.Marshal(objectMap)
  7674  }
  7675  
  7676  // RestorableMongodbDatabasesListResult the List operation response, that contains the MongoDB database
  7677  // events and their properties.
  7678  type RestorableMongodbDatabasesListResult struct {
  7679  	autorest.Response `json:"-"`
  7680  	// Value - READ-ONLY; List of MongoDB database events and their properties.
  7681  	Value *[]RestorableMongodbDatabaseGetResult `json:"value,omitempty"`
  7682  }
  7683  
  7684  // MarshalJSON is the custom marshaler for RestorableMongodbDatabasesListResult.
  7685  func (rmdlr RestorableMongodbDatabasesListResult) MarshalJSON() ([]byte, error) {
  7686  	objectMap := make(map[string]interface{})
  7687  	return json.Marshal(objectMap)
  7688  }
  7689  
  7690  // RestorableMongodbResourcesListResult the List operation response, that contains the restorable MongoDB
  7691  // resources.
  7692  type RestorableMongodbResourcesListResult struct {
  7693  	autorest.Response `json:"-"`
  7694  	// Value - READ-ONLY; List of restorable MongoDB resources, including the database and collection names.
  7695  	Value *[]DatabaseRestoreResource `json:"value,omitempty"`
  7696  }
  7697  
  7698  // MarshalJSON is the custom marshaler for RestorableMongodbResourcesListResult.
  7699  func (rmrlr RestorableMongodbResourcesListResult) MarshalJSON() ([]byte, error) {
  7700  	objectMap := make(map[string]interface{})
  7701  	return json.Marshal(objectMap)
  7702  }
  7703  
  7704  // RestorableSQLContainerGetResult an Azure Cosmos DB SQL container event
  7705  type RestorableSQLContainerGetResult struct {
  7706  	// RestorableSQLContainerProperties - The properties of a SQL container event.
  7707  	*RestorableSQLContainerProperties `json:"properties,omitempty"`
  7708  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  7709  	ID *string `json:"id,omitempty"`
  7710  	// Name - READ-ONLY; The name of the ARM resource.
  7711  	Name *string `json:"name,omitempty"`
  7712  	// Type - READ-ONLY; The type of Azure resource.
  7713  	Type *string `json:"type,omitempty"`
  7714  }
  7715  
  7716  // MarshalJSON is the custom marshaler for RestorableSQLContainerGetResult.
  7717  func (rscgr RestorableSQLContainerGetResult) MarshalJSON() ([]byte, error) {
  7718  	objectMap := make(map[string]interface{})
  7719  	if rscgr.RestorableSQLContainerProperties != nil {
  7720  		objectMap["properties"] = rscgr.RestorableSQLContainerProperties
  7721  	}
  7722  	return json.Marshal(objectMap)
  7723  }
  7724  
  7725  // UnmarshalJSON is the custom unmarshaler for RestorableSQLContainerGetResult struct.
  7726  func (rscgr *RestorableSQLContainerGetResult) UnmarshalJSON(body []byte) error {
  7727  	var m map[string]*json.RawMessage
  7728  	err := json.Unmarshal(body, &m)
  7729  	if err != nil {
  7730  		return err
  7731  	}
  7732  	for k, v := range m {
  7733  		switch k {
  7734  		case "properties":
  7735  			if v != nil {
  7736  				var restorableSQLContainerProperties RestorableSQLContainerProperties
  7737  				err = json.Unmarshal(*v, &restorableSQLContainerProperties)
  7738  				if err != nil {
  7739  					return err
  7740  				}
  7741  				rscgr.RestorableSQLContainerProperties = &restorableSQLContainerProperties
  7742  			}
  7743  		case "id":
  7744  			if v != nil {
  7745  				var ID string
  7746  				err = json.Unmarshal(*v, &ID)
  7747  				if err != nil {
  7748  					return err
  7749  				}
  7750  				rscgr.ID = &ID
  7751  			}
  7752  		case "name":
  7753  			if v != nil {
  7754  				var name string
  7755  				err = json.Unmarshal(*v, &name)
  7756  				if err != nil {
  7757  					return err
  7758  				}
  7759  				rscgr.Name = &name
  7760  			}
  7761  		case "type":
  7762  			if v != nil {
  7763  				var typeVar string
  7764  				err = json.Unmarshal(*v, &typeVar)
  7765  				if err != nil {
  7766  					return err
  7767  				}
  7768  				rscgr.Type = &typeVar
  7769  			}
  7770  		}
  7771  	}
  7772  
  7773  	return nil
  7774  }
  7775  
  7776  // RestorableSQLContainerProperties the properties of an Azure Cosmos DB SQL container event
  7777  type RestorableSQLContainerProperties struct {
  7778  	// Resource - The resource of an Azure Cosmos DB SQL container event
  7779  	Resource *RestorableSQLContainerPropertiesResource `json:"resource,omitempty"`
  7780  }
  7781  
  7782  // RestorableSQLContainerPropertiesResource the resource of an Azure Cosmos DB SQL container event
  7783  type RestorableSQLContainerPropertiesResource struct {
  7784  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7785  	Rid *string `json:"_rid,omitempty"`
  7786  	// OperationType - READ-ONLY; The operation type of this container event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  7787  	OperationType OperationType `json:"operationType,omitempty"`
  7788  	// EventTimestamp - READ-ONLY; The when this container event happened.
  7789  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  7790  	// OwnerID - READ-ONLY; The name of this SQL container.
  7791  	OwnerID *string `json:"ownerId,omitempty"`
  7792  	// OwnerResourceID - READ-ONLY; The resource ID of this SQL container.
  7793  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  7794  	// Container - Cosmos DB SQL container resource object
  7795  	Container *RestorableSQLContainerPropertiesResourceContainer `json:"container,omitempty"`
  7796  }
  7797  
  7798  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResource.
  7799  func (rscp RestorableSQLContainerPropertiesResource) MarshalJSON() ([]byte, error) {
  7800  	objectMap := make(map[string]interface{})
  7801  	if rscp.Container != nil {
  7802  		objectMap["container"] = rscp.Container
  7803  	}
  7804  	return json.Marshal(objectMap)
  7805  }
  7806  
  7807  // RestorableSQLContainerPropertiesResourceContainer cosmos DB SQL container resource object
  7808  type RestorableSQLContainerPropertiesResourceContainer struct {
  7809  	// ID - Name of the Cosmos DB SQL container
  7810  	ID *string `json:"id,omitempty"`
  7811  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  7812  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  7813  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  7814  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  7815  	// DefaultTTL - Default time to live
  7816  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  7817  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  7818  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  7819  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  7820  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  7821  	// AnalyticalStorageTTL - Analytical TTL.
  7822  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  7823  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7824  	Rid *string `json:"_rid,omitempty"`
  7825  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  7826  	Ts *float64 `json:"_ts,omitempty"`
  7827  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  7828  	Etag *string `json:"_etag,omitempty"`
  7829  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the container resource.
  7830  	Self *string `json:"_self,omitempty"`
  7831  }
  7832  
  7833  // MarshalJSON is the custom marshaler for RestorableSQLContainerPropertiesResourceContainer.
  7834  func (rscp RestorableSQLContainerPropertiesResourceContainer) MarshalJSON() ([]byte, error) {
  7835  	objectMap := make(map[string]interface{})
  7836  	if rscp.ID != nil {
  7837  		objectMap["id"] = rscp.ID
  7838  	}
  7839  	if rscp.IndexingPolicy != nil {
  7840  		objectMap["indexingPolicy"] = rscp.IndexingPolicy
  7841  	}
  7842  	if rscp.PartitionKey != nil {
  7843  		objectMap["partitionKey"] = rscp.PartitionKey
  7844  	}
  7845  	if rscp.DefaultTTL != nil {
  7846  		objectMap["defaultTtl"] = rscp.DefaultTTL
  7847  	}
  7848  	if rscp.UniqueKeyPolicy != nil {
  7849  		objectMap["uniqueKeyPolicy"] = rscp.UniqueKeyPolicy
  7850  	}
  7851  	if rscp.ConflictResolutionPolicy != nil {
  7852  		objectMap["conflictResolutionPolicy"] = rscp.ConflictResolutionPolicy
  7853  	}
  7854  	if rscp.AnalyticalStorageTTL != nil {
  7855  		objectMap["analyticalStorageTtl"] = rscp.AnalyticalStorageTTL
  7856  	}
  7857  	return json.Marshal(objectMap)
  7858  }
  7859  
  7860  // RestorableSQLContainersListResult the List operation response, that contains the SQL container events
  7861  // and their properties.
  7862  type RestorableSQLContainersListResult struct {
  7863  	autorest.Response `json:"-"`
  7864  	// Value - READ-ONLY; List of SQL container events and their properties.
  7865  	Value *[]RestorableSQLContainerGetResult `json:"value,omitempty"`
  7866  }
  7867  
  7868  // MarshalJSON is the custom marshaler for RestorableSQLContainersListResult.
  7869  func (rsclr RestorableSQLContainersListResult) MarshalJSON() ([]byte, error) {
  7870  	objectMap := make(map[string]interface{})
  7871  	return json.Marshal(objectMap)
  7872  }
  7873  
  7874  // RestorableSQLDatabaseGetResult an Azure Cosmos DB SQL database event
  7875  type RestorableSQLDatabaseGetResult struct {
  7876  	// RestorableSQLDatabaseProperties - The properties of a SQL database event.
  7877  	*RestorableSQLDatabaseProperties `json:"properties,omitempty"`
  7878  	// ID - READ-ONLY; The unique resource Identifier of the ARM resource.
  7879  	ID *string `json:"id,omitempty"`
  7880  	// Name - READ-ONLY; The name of the ARM resource.
  7881  	Name *string `json:"name,omitempty"`
  7882  	// Type - READ-ONLY; The type of Azure resource.
  7883  	Type *string `json:"type,omitempty"`
  7884  }
  7885  
  7886  // MarshalJSON is the custom marshaler for RestorableSQLDatabaseGetResult.
  7887  func (rsdgr RestorableSQLDatabaseGetResult) MarshalJSON() ([]byte, error) {
  7888  	objectMap := make(map[string]interface{})
  7889  	if rsdgr.RestorableSQLDatabaseProperties != nil {
  7890  		objectMap["properties"] = rsdgr.RestorableSQLDatabaseProperties
  7891  	}
  7892  	return json.Marshal(objectMap)
  7893  }
  7894  
  7895  // UnmarshalJSON is the custom unmarshaler for RestorableSQLDatabaseGetResult struct.
  7896  func (rsdgr *RestorableSQLDatabaseGetResult) UnmarshalJSON(body []byte) error {
  7897  	var m map[string]*json.RawMessage
  7898  	err := json.Unmarshal(body, &m)
  7899  	if err != nil {
  7900  		return err
  7901  	}
  7902  	for k, v := range m {
  7903  		switch k {
  7904  		case "properties":
  7905  			if v != nil {
  7906  				var restorableSQLDatabaseProperties RestorableSQLDatabaseProperties
  7907  				err = json.Unmarshal(*v, &restorableSQLDatabaseProperties)
  7908  				if err != nil {
  7909  					return err
  7910  				}
  7911  				rsdgr.RestorableSQLDatabaseProperties = &restorableSQLDatabaseProperties
  7912  			}
  7913  		case "id":
  7914  			if v != nil {
  7915  				var ID string
  7916  				err = json.Unmarshal(*v, &ID)
  7917  				if err != nil {
  7918  					return err
  7919  				}
  7920  				rsdgr.ID = &ID
  7921  			}
  7922  		case "name":
  7923  			if v != nil {
  7924  				var name string
  7925  				err = json.Unmarshal(*v, &name)
  7926  				if err != nil {
  7927  					return err
  7928  				}
  7929  				rsdgr.Name = &name
  7930  			}
  7931  		case "type":
  7932  			if v != nil {
  7933  				var typeVar string
  7934  				err = json.Unmarshal(*v, &typeVar)
  7935  				if err != nil {
  7936  					return err
  7937  				}
  7938  				rsdgr.Type = &typeVar
  7939  			}
  7940  		}
  7941  	}
  7942  
  7943  	return nil
  7944  }
  7945  
  7946  // RestorableSQLDatabaseProperties the properties of an Azure Cosmos DB SQL database event
  7947  type RestorableSQLDatabaseProperties struct {
  7948  	// Resource - The resource of an Azure Cosmos DB SQL database event
  7949  	Resource *RestorableSQLDatabasePropertiesResource `json:"resource,omitempty"`
  7950  }
  7951  
  7952  // RestorableSQLDatabasePropertiesResource the resource of an Azure Cosmos DB SQL database event
  7953  type RestorableSQLDatabasePropertiesResource struct {
  7954  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7955  	Rid *string `json:"_rid,omitempty"`
  7956  	// OperationType - READ-ONLY; The operation type of this database event. Possible values include: 'OperationTypeCreate', 'OperationTypeReplace', 'OperationTypeDelete', 'OperationTypeSystemOperation'
  7957  	OperationType OperationType `json:"operationType,omitempty"`
  7958  	// EventTimestamp - READ-ONLY; The time when this database event happened.
  7959  	EventTimestamp *string `json:"eventTimestamp,omitempty"`
  7960  	// OwnerID - READ-ONLY; The name of the SQL database.
  7961  	OwnerID *string `json:"ownerId,omitempty"`
  7962  	// OwnerResourceID - READ-ONLY; The resource ID of the SQL database.
  7963  	OwnerResourceID *string `json:"ownerResourceId,omitempty"`
  7964  	// Database - Cosmos DB SQL database resource object
  7965  	Database *RestorableSQLDatabasePropertiesResourceDatabase `json:"database,omitempty"`
  7966  }
  7967  
  7968  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResource.
  7969  func (rsdp RestorableSQLDatabasePropertiesResource) MarshalJSON() ([]byte, error) {
  7970  	objectMap := make(map[string]interface{})
  7971  	if rsdp.Database != nil {
  7972  		objectMap["database"] = rsdp.Database
  7973  	}
  7974  	return json.Marshal(objectMap)
  7975  }
  7976  
  7977  // RestorableSQLDatabasePropertiesResourceDatabase cosmos DB SQL database resource object
  7978  type RestorableSQLDatabasePropertiesResourceDatabase struct {
  7979  	// ID - Name of the Cosmos DB SQL database
  7980  	ID *string `json:"id,omitempty"`
  7981  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  7982  	Rid *string `json:"_rid,omitempty"`
  7983  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  7984  	Ts *float64 `json:"_ts,omitempty"`
  7985  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  7986  	Etag *string `json:"_etag,omitempty"`
  7987  	// Colls - READ-ONLY; A system generated property that specified the addressable path of the collections resource.
  7988  	Colls *string `json:"_colls,omitempty"`
  7989  	// Users - READ-ONLY; A system generated property that specifies the addressable path of the users resource.
  7990  	Users *string `json:"_users,omitempty"`
  7991  	// Self - READ-ONLY; A system generated property that specifies the addressable path of the database resource.
  7992  	Self *string `json:"_self,omitempty"`
  7993  }
  7994  
  7995  // MarshalJSON is the custom marshaler for RestorableSQLDatabasePropertiesResourceDatabase.
  7996  func (rsdp RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON() ([]byte, error) {
  7997  	objectMap := make(map[string]interface{})
  7998  	if rsdp.ID != nil {
  7999  		objectMap["id"] = rsdp.ID
  8000  	}
  8001  	return json.Marshal(objectMap)
  8002  }
  8003  
  8004  // RestorableSQLDatabasesListResult the List operation response, that contains the SQL database events and
  8005  // their properties.
  8006  type RestorableSQLDatabasesListResult struct {
  8007  	autorest.Response `json:"-"`
  8008  	// Value - READ-ONLY; List of SQL database events and their properties.
  8009  	Value *[]RestorableSQLDatabaseGetResult `json:"value,omitempty"`
  8010  }
  8011  
  8012  // MarshalJSON is the custom marshaler for RestorableSQLDatabasesListResult.
  8013  func (rsdlr RestorableSQLDatabasesListResult) MarshalJSON() ([]byte, error) {
  8014  	objectMap := make(map[string]interface{})
  8015  	return json.Marshal(objectMap)
  8016  }
  8017  
  8018  // RestorableSQLResourcesListResult the List operation response, that contains the restorable SQL
  8019  // resources.
  8020  type RestorableSQLResourcesListResult struct {
  8021  	autorest.Response `json:"-"`
  8022  	// Value - READ-ONLY; List of restorable SQL resources, including the database and collection names.
  8023  	Value *[]DatabaseRestoreResource `json:"value,omitempty"`
  8024  }
  8025  
  8026  // MarshalJSON is the custom marshaler for RestorableSQLResourcesListResult.
  8027  func (rsrlr RestorableSQLResourcesListResult) MarshalJSON() ([]byte, error) {
  8028  	objectMap := make(map[string]interface{})
  8029  	return json.Marshal(objectMap)
  8030  }
  8031  
  8032  // RestoreParameters parameters to indicate the information about the restore.
  8033  type RestoreParameters struct {
  8034  	// RestoreMode - Describes the mode of the restore. Possible values include: 'RestoreModePointInTime'
  8035  	RestoreMode RestoreMode `json:"restoreMode,omitempty"`
  8036  	// 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}
  8037  	RestoreSource *string `json:"restoreSource,omitempty"`
  8038  	// RestoreTimestampInUtc - Time to which the account has to be restored (ISO-8601 format).
  8039  	RestoreTimestampInUtc *date.Time `json:"restoreTimestampInUtc,omitempty"`
  8040  	// DatabasesToRestore - List of specific databases available for restore.
  8041  	DatabasesToRestore *[]DatabaseRestoreResource `json:"databasesToRestore,omitempty"`
  8042  }
  8043  
  8044  // SeedNode ...
  8045  type SeedNode struct {
  8046  	// IPAddress - IP address of this seed node.
  8047  	IPAddress *string `json:"ipAddress,omitempty"`
  8048  }
  8049  
  8050  // SpatialSpec ...
  8051  type SpatialSpec struct {
  8052  	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
  8053  	Path *string `json:"path,omitempty"`
  8054  	// Types - List of path's spatial type
  8055  	Types *[]SpatialType `json:"types,omitempty"`
  8056  }
  8057  
  8058  // SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container.
  8059  type SQLContainerCreateUpdateParameters struct {
  8060  	// SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
  8061  	*SQLContainerCreateUpdateProperties `json:"properties,omitempty"`
  8062  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8063  	ID *string `json:"id,omitempty"`
  8064  	// Name - READ-ONLY; The name of the ARM resource.
  8065  	Name *string `json:"name,omitempty"`
  8066  	// Type - READ-ONLY; The type of Azure resource.
  8067  	Type *string `json:"type,omitempty"`
  8068  	// Location - The location of the resource group to which the resource belongs.
  8069  	Location *string            `json:"location,omitempty"`
  8070  	Tags     map[string]*string `json:"tags"`
  8071  }
  8072  
  8073  // MarshalJSON is the custom marshaler for SQLContainerCreateUpdateParameters.
  8074  func (sccup SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  8075  	objectMap := make(map[string]interface{})
  8076  	if sccup.SQLContainerCreateUpdateProperties != nil {
  8077  		objectMap["properties"] = sccup.SQLContainerCreateUpdateProperties
  8078  	}
  8079  	if sccup.Location != nil {
  8080  		objectMap["location"] = sccup.Location
  8081  	}
  8082  	if sccup.Tags != nil {
  8083  		objectMap["tags"] = sccup.Tags
  8084  	}
  8085  	return json.Marshal(objectMap)
  8086  }
  8087  
  8088  // UnmarshalJSON is the custom unmarshaler for SQLContainerCreateUpdateParameters struct.
  8089  func (sccup *SQLContainerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  8090  	var m map[string]*json.RawMessage
  8091  	err := json.Unmarshal(body, &m)
  8092  	if err != nil {
  8093  		return err
  8094  	}
  8095  	for k, v := range m {
  8096  		switch k {
  8097  		case "properties":
  8098  			if v != nil {
  8099  				var SQLContainerCreateUpdateProperties SQLContainerCreateUpdateProperties
  8100  				err = json.Unmarshal(*v, &SQLContainerCreateUpdateProperties)
  8101  				if err != nil {
  8102  					return err
  8103  				}
  8104  				sccup.SQLContainerCreateUpdateProperties = &SQLContainerCreateUpdateProperties
  8105  			}
  8106  		case "id":
  8107  			if v != nil {
  8108  				var ID string
  8109  				err = json.Unmarshal(*v, &ID)
  8110  				if err != nil {
  8111  					return err
  8112  				}
  8113  				sccup.ID = &ID
  8114  			}
  8115  		case "name":
  8116  			if v != nil {
  8117  				var name string
  8118  				err = json.Unmarshal(*v, &name)
  8119  				if err != nil {
  8120  					return err
  8121  				}
  8122  				sccup.Name = &name
  8123  			}
  8124  		case "type":
  8125  			if v != nil {
  8126  				var typeVar string
  8127  				err = json.Unmarshal(*v, &typeVar)
  8128  				if err != nil {
  8129  					return err
  8130  				}
  8131  				sccup.Type = &typeVar
  8132  			}
  8133  		case "location":
  8134  			if v != nil {
  8135  				var location string
  8136  				err = json.Unmarshal(*v, &location)
  8137  				if err != nil {
  8138  					return err
  8139  				}
  8140  				sccup.Location = &location
  8141  			}
  8142  		case "tags":
  8143  			if v != nil {
  8144  				var tags map[string]*string
  8145  				err = json.Unmarshal(*v, &tags)
  8146  				if err != nil {
  8147  					return err
  8148  				}
  8149  				sccup.Tags = tags
  8150  			}
  8151  		}
  8152  	}
  8153  
  8154  	return nil
  8155  }
  8156  
  8157  // SQLContainerCreateUpdateProperties properties to create and update Azure Cosmos DB container.
  8158  type SQLContainerCreateUpdateProperties struct {
  8159  	// Resource - The standard JSON format of a container
  8160  	Resource *SQLContainerResource `json:"resource,omitempty"`
  8161  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  8162  	Options *CreateUpdateOptions `json:"options,omitempty"`
  8163  }
  8164  
  8165  // SQLContainerGetProperties the properties of an Azure Cosmos DB container
  8166  type SQLContainerGetProperties struct {
  8167  	Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"`
  8168  	Options  *SQLContainerGetPropertiesOptions  `json:"options,omitempty"`
  8169  }
  8170  
  8171  // SQLContainerGetPropertiesOptions ...
  8172  type SQLContainerGetPropertiesOptions struct {
  8173  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  8174  	Throughput *int32 `json:"throughput,omitempty"`
  8175  	// AutoscaleSettings - Specifies the Autoscale settings.
  8176  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  8177  }
  8178  
  8179  // SQLContainerGetPropertiesResource ...
  8180  type SQLContainerGetPropertiesResource struct {
  8181  	// ID - Name of the Cosmos DB SQL container
  8182  	ID *string `json:"id,omitempty"`
  8183  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  8184  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  8185  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  8186  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  8187  	// DefaultTTL - Default time to live
  8188  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  8189  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  8190  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  8191  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  8192  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  8193  	// AnalyticalStorageTTL - Analytical TTL.
  8194  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  8195  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8196  	Rid *string `json:"_rid,omitempty"`
  8197  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  8198  	Ts *float64 `json:"_ts,omitempty"`
  8199  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  8200  	Etag *string `json:"_etag,omitempty"`
  8201  }
  8202  
  8203  // MarshalJSON is the custom marshaler for SQLContainerGetPropertiesResource.
  8204  func (scgp SQLContainerGetPropertiesResource) MarshalJSON() ([]byte, error) {
  8205  	objectMap := make(map[string]interface{})
  8206  	if scgp.ID != nil {
  8207  		objectMap["id"] = scgp.ID
  8208  	}
  8209  	if scgp.IndexingPolicy != nil {
  8210  		objectMap["indexingPolicy"] = scgp.IndexingPolicy
  8211  	}
  8212  	if scgp.PartitionKey != nil {
  8213  		objectMap["partitionKey"] = scgp.PartitionKey
  8214  	}
  8215  	if scgp.DefaultTTL != nil {
  8216  		objectMap["defaultTtl"] = scgp.DefaultTTL
  8217  	}
  8218  	if scgp.UniqueKeyPolicy != nil {
  8219  		objectMap["uniqueKeyPolicy"] = scgp.UniqueKeyPolicy
  8220  	}
  8221  	if scgp.ConflictResolutionPolicy != nil {
  8222  		objectMap["conflictResolutionPolicy"] = scgp.ConflictResolutionPolicy
  8223  	}
  8224  	if scgp.AnalyticalStorageTTL != nil {
  8225  		objectMap["analyticalStorageTtl"] = scgp.AnalyticalStorageTTL
  8226  	}
  8227  	return json.Marshal(objectMap)
  8228  }
  8229  
  8230  // SQLContainerGetResults an Azure Cosmos DB container.
  8231  type SQLContainerGetResults struct {
  8232  	autorest.Response `json:"-"`
  8233  	// SQLContainerGetProperties - The properties of an Azure Cosmos DB container
  8234  	*SQLContainerGetProperties `json:"properties,omitempty"`
  8235  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8236  	ID *string `json:"id,omitempty"`
  8237  	// Name - READ-ONLY; The name of the ARM resource.
  8238  	Name *string `json:"name,omitempty"`
  8239  	// Type - READ-ONLY; The type of Azure resource.
  8240  	Type *string `json:"type,omitempty"`
  8241  	// Location - The location of the resource group to which the resource belongs.
  8242  	Location *string            `json:"location,omitempty"`
  8243  	Tags     map[string]*string `json:"tags"`
  8244  }
  8245  
  8246  // MarshalJSON is the custom marshaler for SQLContainerGetResults.
  8247  func (scgr SQLContainerGetResults) MarshalJSON() ([]byte, error) {
  8248  	objectMap := make(map[string]interface{})
  8249  	if scgr.SQLContainerGetProperties != nil {
  8250  		objectMap["properties"] = scgr.SQLContainerGetProperties
  8251  	}
  8252  	if scgr.Location != nil {
  8253  		objectMap["location"] = scgr.Location
  8254  	}
  8255  	if scgr.Tags != nil {
  8256  		objectMap["tags"] = scgr.Tags
  8257  	}
  8258  	return json.Marshal(objectMap)
  8259  }
  8260  
  8261  // UnmarshalJSON is the custom unmarshaler for SQLContainerGetResults struct.
  8262  func (scgr *SQLContainerGetResults) UnmarshalJSON(body []byte) error {
  8263  	var m map[string]*json.RawMessage
  8264  	err := json.Unmarshal(body, &m)
  8265  	if err != nil {
  8266  		return err
  8267  	}
  8268  	for k, v := range m {
  8269  		switch k {
  8270  		case "properties":
  8271  			if v != nil {
  8272  				var SQLContainerGetProperties SQLContainerGetProperties
  8273  				err = json.Unmarshal(*v, &SQLContainerGetProperties)
  8274  				if err != nil {
  8275  					return err
  8276  				}
  8277  				scgr.SQLContainerGetProperties = &SQLContainerGetProperties
  8278  			}
  8279  		case "id":
  8280  			if v != nil {
  8281  				var ID string
  8282  				err = json.Unmarshal(*v, &ID)
  8283  				if err != nil {
  8284  					return err
  8285  				}
  8286  				scgr.ID = &ID
  8287  			}
  8288  		case "name":
  8289  			if v != nil {
  8290  				var name string
  8291  				err = json.Unmarshal(*v, &name)
  8292  				if err != nil {
  8293  					return err
  8294  				}
  8295  				scgr.Name = &name
  8296  			}
  8297  		case "type":
  8298  			if v != nil {
  8299  				var typeVar string
  8300  				err = json.Unmarshal(*v, &typeVar)
  8301  				if err != nil {
  8302  					return err
  8303  				}
  8304  				scgr.Type = &typeVar
  8305  			}
  8306  		case "location":
  8307  			if v != nil {
  8308  				var location string
  8309  				err = json.Unmarshal(*v, &location)
  8310  				if err != nil {
  8311  					return err
  8312  				}
  8313  				scgr.Location = &location
  8314  			}
  8315  		case "tags":
  8316  			if v != nil {
  8317  				var tags map[string]*string
  8318  				err = json.Unmarshal(*v, &tags)
  8319  				if err != nil {
  8320  					return err
  8321  				}
  8322  				scgr.Tags = tags
  8323  			}
  8324  		}
  8325  	}
  8326  
  8327  	return nil
  8328  }
  8329  
  8330  // SQLContainerListResult the List operation response, that contains the containers and their properties.
  8331  type SQLContainerListResult struct {
  8332  	autorest.Response `json:"-"`
  8333  	// Value - READ-ONLY; List of containers and their properties.
  8334  	Value *[]SQLContainerGetResults `json:"value,omitempty"`
  8335  }
  8336  
  8337  // MarshalJSON is the custom marshaler for SQLContainerListResult.
  8338  func (sclr SQLContainerListResult) MarshalJSON() ([]byte, error) {
  8339  	objectMap := make(map[string]interface{})
  8340  	return json.Marshal(objectMap)
  8341  }
  8342  
  8343  // SQLContainerResource cosmos DB SQL container resource object
  8344  type SQLContainerResource struct {
  8345  	// ID - Name of the Cosmos DB SQL container
  8346  	ID *string `json:"id,omitempty"`
  8347  	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
  8348  	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
  8349  	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
  8350  	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
  8351  	// DefaultTTL - Default time to live
  8352  	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
  8353  	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
  8354  	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
  8355  	// ConflictResolutionPolicy - The conflict resolution policy for the container.
  8356  	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
  8357  	// AnalyticalStorageTTL - Analytical TTL.
  8358  	AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"`
  8359  }
  8360  
  8361  // SQLDatabaseCreateUpdateParameters parameters to create and update Cosmos DB SQL database.
  8362  type SQLDatabaseCreateUpdateParameters struct {
  8363  	// SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
  8364  	*SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"`
  8365  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8366  	ID *string `json:"id,omitempty"`
  8367  	// Name - READ-ONLY; The name of the ARM resource.
  8368  	Name *string `json:"name,omitempty"`
  8369  	// Type - READ-ONLY; The type of Azure resource.
  8370  	Type *string `json:"type,omitempty"`
  8371  	// Location - The location of the resource group to which the resource belongs.
  8372  	Location *string            `json:"location,omitempty"`
  8373  	Tags     map[string]*string `json:"tags"`
  8374  }
  8375  
  8376  // MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateParameters.
  8377  func (sdcup SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  8378  	objectMap := make(map[string]interface{})
  8379  	if sdcup.SQLDatabaseCreateUpdateProperties != nil {
  8380  		objectMap["properties"] = sdcup.SQLDatabaseCreateUpdateProperties
  8381  	}
  8382  	if sdcup.Location != nil {
  8383  		objectMap["location"] = sdcup.Location
  8384  	}
  8385  	if sdcup.Tags != nil {
  8386  		objectMap["tags"] = sdcup.Tags
  8387  	}
  8388  	return json.Marshal(objectMap)
  8389  }
  8390  
  8391  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseCreateUpdateParameters struct.
  8392  func (sdcup *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  8393  	var m map[string]*json.RawMessage
  8394  	err := json.Unmarshal(body, &m)
  8395  	if err != nil {
  8396  		return err
  8397  	}
  8398  	for k, v := range m {
  8399  		switch k {
  8400  		case "properties":
  8401  			if v != nil {
  8402  				var SQLDatabaseCreateUpdateProperties SQLDatabaseCreateUpdateProperties
  8403  				err = json.Unmarshal(*v, &SQLDatabaseCreateUpdateProperties)
  8404  				if err != nil {
  8405  					return err
  8406  				}
  8407  				sdcup.SQLDatabaseCreateUpdateProperties = &SQLDatabaseCreateUpdateProperties
  8408  			}
  8409  		case "id":
  8410  			if v != nil {
  8411  				var ID string
  8412  				err = json.Unmarshal(*v, &ID)
  8413  				if err != nil {
  8414  					return err
  8415  				}
  8416  				sdcup.ID = &ID
  8417  			}
  8418  		case "name":
  8419  			if v != nil {
  8420  				var name string
  8421  				err = json.Unmarshal(*v, &name)
  8422  				if err != nil {
  8423  					return err
  8424  				}
  8425  				sdcup.Name = &name
  8426  			}
  8427  		case "type":
  8428  			if v != nil {
  8429  				var typeVar string
  8430  				err = json.Unmarshal(*v, &typeVar)
  8431  				if err != nil {
  8432  					return err
  8433  				}
  8434  				sdcup.Type = &typeVar
  8435  			}
  8436  		case "location":
  8437  			if v != nil {
  8438  				var location string
  8439  				err = json.Unmarshal(*v, &location)
  8440  				if err != nil {
  8441  					return err
  8442  				}
  8443  				sdcup.Location = &location
  8444  			}
  8445  		case "tags":
  8446  			if v != nil {
  8447  				var tags map[string]*string
  8448  				err = json.Unmarshal(*v, &tags)
  8449  				if err != nil {
  8450  					return err
  8451  				}
  8452  				sdcup.Tags = tags
  8453  			}
  8454  		}
  8455  	}
  8456  
  8457  	return nil
  8458  }
  8459  
  8460  // SQLDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB SQL database.
  8461  type SQLDatabaseCreateUpdateProperties struct {
  8462  	// Resource - The standard JSON format of a SQL database
  8463  	Resource *SQLDatabaseResource `json:"resource,omitempty"`
  8464  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  8465  	Options *CreateUpdateOptions `json:"options,omitempty"`
  8466  }
  8467  
  8468  // SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database
  8469  type SQLDatabaseGetProperties struct {
  8470  	Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"`
  8471  	Options  *SQLDatabaseGetPropertiesOptions  `json:"options,omitempty"`
  8472  }
  8473  
  8474  // SQLDatabaseGetPropertiesOptions ...
  8475  type SQLDatabaseGetPropertiesOptions struct {
  8476  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
  8477  	Throughput *int32 `json:"throughput,omitempty"`
  8478  	// AutoscaleSettings - Specifies the Autoscale settings.
  8479  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
  8480  }
  8481  
  8482  // SQLDatabaseGetPropertiesResource ...
  8483  type SQLDatabaseGetPropertiesResource struct {
  8484  	// ID - Name of the Cosmos DB SQL database
  8485  	ID *string `json:"id,omitempty"`
  8486  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  8487  	Rid *string `json:"_rid,omitempty"`
  8488  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  8489  	Ts *float64 `json:"_ts,omitempty"`
  8490  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  8491  	Etag *string `json:"_etag,omitempty"`
  8492  	// Colls - A system generated property that specified the addressable path of the collections resource.
  8493  	Colls *string `json:"_colls,omitempty"`
  8494  	// Users - A system generated property that specifies the addressable path of the users resource.
  8495  	Users *string `json:"_users,omitempty"`
  8496  }
  8497  
  8498  // MarshalJSON is the custom marshaler for SQLDatabaseGetPropertiesResource.
  8499  func (sdgp SQLDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error) {
  8500  	objectMap := make(map[string]interface{})
  8501  	if sdgp.ID != nil {
  8502  		objectMap["id"] = sdgp.ID
  8503  	}
  8504  	if sdgp.Colls != nil {
  8505  		objectMap["_colls"] = sdgp.Colls
  8506  	}
  8507  	if sdgp.Users != nil {
  8508  		objectMap["_users"] = sdgp.Users
  8509  	}
  8510  	return json.Marshal(objectMap)
  8511  }
  8512  
  8513  // SQLDatabaseGetResults an Azure Cosmos DB SQL database.
  8514  type SQLDatabaseGetResults struct {
  8515  	autorest.Response `json:"-"`
  8516  	// SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
  8517  	*SQLDatabaseGetProperties `json:"properties,omitempty"`
  8518  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  8519  	ID *string `json:"id,omitempty"`
  8520  	// Name - READ-ONLY; The name of the ARM resource.
  8521  	Name *string `json:"name,omitempty"`
  8522  	// Type - READ-ONLY; The type of Azure resource.
  8523  	Type *string `json:"type,omitempty"`
  8524  	// Location - The location of the resource group to which the resource belongs.
  8525  	Location *string            `json:"location,omitempty"`
  8526  	Tags     map[string]*string `json:"tags"`
  8527  }
  8528  
  8529  // MarshalJSON is the custom marshaler for SQLDatabaseGetResults.
  8530  func (sdgr SQLDatabaseGetResults) MarshalJSON() ([]byte, error) {
  8531  	objectMap := make(map[string]interface{})
  8532  	if sdgr.SQLDatabaseGetProperties != nil {
  8533  		objectMap["properties"] = sdgr.SQLDatabaseGetProperties
  8534  	}
  8535  	if sdgr.Location != nil {
  8536  		objectMap["location"] = sdgr.Location
  8537  	}
  8538  	if sdgr.Tags != nil {
  8539  		objectMap["tags"] = sdgr.Tags
  8540  	}
  8541  	return json.Marshal(objectMap)
  8542  }
  8543  
  8544  // UnmarshalJSON is the custom unmarshaler for SQLDatabaseGetResults struct.
  8545  func (sdgr *SQLDatabaseGetResults) UnmarshalJSON(body []byte) error {
  8546  	var m map[string]*json.RawMessage
  8547  	err := json.Unmarshal(body, &m)
  8548  	if err != nil {
  8549  		return err
  8550  	}
  8551  	for k, v := range m {
  8552  		switch k {
  8553  		case "properties":
  8554  			if v != nil {
  8555  				var SQLDatabaseGetProperties SQLDatabaseGetProperties
  8556  				err = json.Unmarshal(*v, &SQLDatabaseGetProperties)
  8557  				if err != nil {
  8558  					return err
  8559  				}
  8560  				sdgr.SQLDatabaseGetProperties = &SQLDatabaseGetProperties
  8561  			}
  8562  		case "id":
  8563  			if v != nil {
  8564  				var ID string
  8565  				err = json.Unmarshal(*v, &ID)
  8566  				if err != nil {
  8567  					return err
  8568  				}
  8569  				sdgr.ID = &ID
  8570  			}
  8571  		case "name":
  8572  			if v != nil {
  8573  				var name string
  8574  				err = json.Unmarshal(*v, &name)
  8575  				if err != nil {
  8576  					return err
  8577  				}
  8578  				sdgr.Name = &name
  8579  			}
  8580  		case "type":
  8581  			if v != nil {
  8582  				var typeVar string
  8583  				err = json.Unmarshal(*v, &typeVar)
  8584  				if err != nil {
  8585  					return err
  8586  				}
  8587  				sdgr.Type = &typeVar
  8588  			}
  8589  		case "location":
  8590  			if v != nil {
  8591  				var location string
  8592  				err = json.Unmarshal(*v, &location)
  8593  				if err != nil {
  8594  					return err
  8595  				}
  8596  				sdgr.Location = &location
  8597  			}
  8598  		case "tags":
  8599  			if v != nil {
  8600  				var tags map[string]*string
  8601  				err = json.Unmarshal(*v, &tags)
  8602  				if err != nil {
  8603  					return err
  8604  				}
  8605  				sdgr.Tags = tags
  8606  			}
  8607  		}
  8608  	}
  8609  
  8610  	return nil
  8611  }
  8612  
  8613  // SQLDatabaseListResult the List operation response, that contains the SQL databases and their properties.
  8614  type SQLDatabaseListResult struct {
  8615  	autorest.Response `json:"-"`
  8616  	// Value - READ-ONLY; List of SQL databases and their properties.
  8617  	Value *[]SQLDatabaseGetResults `json:"value,omitempty"`
  8618  }
  8619  
  8620  // MarshalJSON is the custom marshaler for SQLDatabaseListResult.
  8621  func (sdlr SQLDatabaseListResult) MarshalJSON() ([]byte, error) {
  8622  	objectMap := make(map[string]interface{})
  8623  	return json.Marshal(objectMap)
  8624  }
  8625  
  8626  // SQLDatabaseResource cosmos DB SQL database resource object
  8627  type SQLDatabaseResource struct {
  8628  	// ID - Name of the Cosmos DB SQL database
  8629  	ID *string `json:"id,omitempty"`
  8630  }
  8631  
  8632  // SQLResourcesCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results of a
  8633  // long-running operation.
  8634  type SQLResourcesCreateUpdateSQLContainerFuture struct {
  8635  	azure.FutureAPI
  8636  	// Result returns the result of the asynchronous operation.
  8637  	// If the operation has not completed it will return an error.
  8638  	Result func(SQLResourcesClient) (SQLContainerGetResults, error)
  8639  }
  8640  
  8641  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8642  func (future *SQLResourcesCreateUpdateSQLContainerFuture) UnmarshalJSON(body []byte) error {
  8643  	var azFuture azure.Future
  8644  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8645  		return err
  8646  	}
  8647  	future.FutureAPI = &azFuture
  8648  	future.Result = future.result
  8649  	return nil
  8650  }
  8651  
  8652  // result is the default implementation for SQLResourcesCreateUpdateSQLContainerFuture.Result.
  8653  func (future *SQLResourcesCreateUpdateSQLContainerFuture) result(client SQLResourcesClient) (scgr SQLContainerGetResults, err error) {
  8654  	var done bool
  8655  	done, err = future.DoneWithContext(context.Background(), client)
  8656  	if err != nil {
  8657  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", future.Response(), "Polling failure")
  8658  		return
  8659  	}
  8660  	if !done {
  8661  		scgr.Response.Response = future.Response()
  8662  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLContainerFuture")
  8663  		return
  8664  	}
  8665  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8666  	if scgr.Response.Response, err = future.GetResult(sender); err == nil && scgr.Response.Response.StatusCode != http.StatusNoContent {
  8667  		scgr, err = client.CreateUpdateSQLContainerResponder(scgr.Response.Response)
  8668  		if err != nil {
  8669  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", scgr.Response.Response, "Failure responding to request")
  8670  		}
  8671  	}
  8672  	return
  8673  }
  8674  
  8675  // SQLResourcesCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
  8676  // long-running operation.
  8677  type SQLResourcesCreateUpdateSQLDatabaseFuture struct {
  8678  	azure.FutureAPI
  8679  	// Result returns the result of the asynchronous operation.
  8680  	// If the operation has not completed it will return an error.
  8681  	Result func(SQLResourcesClient) (SQLDatabaseGetResults, error)
  8682  }
  8683  
  8684  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8685  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
  8686  	var azFuture azure.Future
  8687  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8688  		return err
  8689  	}
  8690  	future.FutureAPI = &azFuture
  8691  	future.Result = future.result
  8692  	return nil
  8693  }
  8694  
  8695  // result is the default implementation for SQLResourcesCreateUpdateSQLDatabaseFuture.Result.
  8696  func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) result(client SQLResourcesClient) (sdgr SQLDatabaseGetResults, err error) {
  8697  	var done bool
  8698  	done, err = future.DoneWithContext(context.Background(), client)
  8699  	if err != nil {
  8700  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
  8701  		return
  8702  	}
  8703  	if !done {
  8704  		sdgr.Response.Response = future.Response()
  8705  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture")
  8706  		return
  8707  	}
  8708  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8709  	if sdgr.Response.Response, err = future.GetResult(sender); err == nil && sdgr.Response.Response.StatusCode != http.StatusNoContent {
  8710  		sdgr, err = client.CreateUpdateSQLDatabaseResponder(sdgr.Response.Response)
  8711  		if err != nil {
  8712  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", sdgr.Response.Response, "Failure responding to request")
  8713  		}
  8714  	}
  8715  	return
  8716  }
  8717  
  8718  // SQLResourcesCreateUpdateSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results
  8719  // of a long-running operation.
  8720  type SQLResourcesCreateUpdateSQLRoleAssignmentFuture struct {
  8721  	azure.FutureAPI
  8722  	// Result returns the result of the asynchronous operation.
  8723  	// If the operation has not completed it will return an error.
  8724  	Result func(SQLResourcesClient) (SQLRoleAssignmentGetResults, error)
  8725  }
  8726  
  8727  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8728  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
  8729  	var azFuture azure.Future
  8730  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8731  		return err
  8732  	}
  8733  	future.FutureAPI = &azFuture
  8734  	future.Result = future.result
  8735  	return nil
  8736  }
  8737  
  8738  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleAssignmentFuture.Result.
  8739  func (future *SQLResourcesCreateUpdateSQLRoleAssignmentFuture) result(client SQLResourcesClient) (sragr SQLRoleAssignmentGetResults, err error) {
  8740  	var done bool
  8741  	done, err = future.DoneWithContext(context.Background(), client)
  8742  	if err != nil {
  8743  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
  8744  		return
  8745  	}
  8746  	if !done {
  8747  		sragr.Response.Response = future.Response()
  8748  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture")
  8749  		return
  8750  	}
  8751  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8752  	if sragr.Response.Response, err = future.GetResult(sender); err == nil && sragr.Response.Response.StatusCode != http.StatusNoContent {
  8753  		sragr, err = client.CreateUpdateSQLRoleAssignmentResponder(sragr.Response.Response)
  8754  		if err != nil {
  8755  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleAssignmentFuture", "Result", sragr.Response.Response, "Failure responding to request")
  8756  		}
  8757  	}
  8758  	return
  8759  }
  8760  
  8761  // SQLResourcesCreateUpdateSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results
  8762  // of a long-running operation.
  8763  type SQLResourcesCreateUpdateSQLRoleDefinitionFuture struct {
  8764  	azure.FutureAPI
  8765  	// Result returns the result of the asynchronous operation.
  8766  	// If the operation has not completed it will return an error.
  8767  	Result func(SQLResourcesClient) (SQLRoleDefinitionGetResults, error)
  8768  }
  8769  
  8770  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8771  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
  8772  	var azFuture azure.Future
  8773  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8774  		return err
  8775  	}
  8776  	future.FutureAPI = &azFuture
  8777  	future.Result = future.result
  8778  	return nil
  8779  }
  8780  
  8781  // result is the default implementation for SQLResourcesCreateUpdateSQLRoleDefinitionFuture.Result.
  8782  func (future *SQLResourcesCreateUpdateSQLRoleDefinitionFuture) result(client SQLResourcesClient) (srdgr SQLRoleDefinitionGetResults, err error) {
  8783  	var done bool
  8784  	done, err = future.DoneWithContext(context.Background(), client)
  8785  	if err != nil {
  8786  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
  8787  		return
  8788  	}
  8789  	if !done {
  8790  		srdgr.Response.Response = future.Response()
  8791  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture")
  8792  		return
  8793  	}
  8794  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8795  	if srdgr.Response.Response, err = future.GetResult(sender); err == nil && srdgr.Response.Response.StatusCode != http.StatusNoContent {
  8796  		srdgr, err = client.CreateUpdateSQLRoleDefinitionResponder(srdgr.Response.Response)
  8797  		if err != nil {
  8798  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLRoleDefinitionFuture", "Result", srdgr.Response.Response, "Failure responding to request")
  8799  		}
  8800  	}
  8801  	return
  8802  }
  8803  
  8804  // SQLResourcesCreateUpdateSQLStoredProcedureFuture an abstraction for monitoring and retrieving the
  8805  // results of a long-running operation.
  8806  type SQLResourcesCreateUpdateSQLStoredProcedureFuture struct {
  8807  	azure.FutureAPI
  8808  	// Result returns the result of the asynchronous operation.
  8809  	// If the operation has not completed it will return an error.
  8810  	Result func(SQLResourcesClient) (SQLStoredProcedureGetResults, error)
  8811  }
  8812  
  8813  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8814  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
  8815  	var azFuture azure.Future
  8816  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8817  		return err
  8818  	}
  8819  	future.FutureAPI = &azFuture
  8820  	future.Result = future.result
  8821  	return nil
  8822  }
  8823  
  8824  // result is the default implementation for SQLResourcesCreateUpdateSQLStoredProcedureFuture.Result.
  8825  func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) result(client SQLResourcesClient) (sspgr SQLStoredProcedureGetResults, err error) {
  8826  	var done bool
  8827  	done, err = future.DoneWithContext(context.Background(), client)
  8828  	if err != nil {
  8829  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
  8830  		return
  8831  	}
  8832  	if !done {
  8833  		sspgr.Response.Response = future.Response()
  8834  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture")
  8835  		return
  8836  	}
  8837  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8838  	if sspgr.Response.Response, err = future.GetResult(sender); err == nil && sspgr.Response.Response.StatusCode != http.StatusNoContent {
  8839  		sspgr, err = client.CreateUpdateSQLStoredProcedureResponder(sspgr.Response.Response)
  8840  		if err != nil {
  8841  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", sspgr.Response.Response, "Failure responding to request")
  8842  		}
  8843  	}
  8844  	return
  8845  }
  8846  
  8847  // SQLResourcesCreateUpdateSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
  8848  // long-running operation.
  8849  type SQLResourcesCreateUpdateSQLTriggerFuture struct {
  8850  	azure.FutureAPI
  8851  	// Result returns the result of the asynchronous operation.
  8852  	// If the operation has not completed it will return an error.
  8853  	Result func(SQLResourcesClient) (SQLTriggerGetResults, error)
  8854  }
  8855  
  8856  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8857  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) UnmarshalJSON(body []byte) error {
  8858  	var azFuture azure.Future
  8859  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8860  		return err
  8861  	}
  8862  	future.FutureAPI = &azFuture
  8863  	future.Result = future.result
  8864  	return nil
  8865  }
  8866  
  8867  // result is the default implementation for SQLResourcesCreateUpdateSQLTriggerFuture.Result.
  8868  func (future *SQLResourcesCreateUpdateSQLTriggerFuture) result(client SQLResourcesClient) (stgr SQLTriggerGetResults, err error) {
  8869  	var done bool
  8870  	done, err = future.DoneWithContext(context.Background(), client)
  8871  	if err != nil {
  8872  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", future.Response(), "Polling failure")
  8873  		return
  8874  	}
  8875  	if !done {
  8876  		stgr.Response.Response = future.Response()
  8877  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLTriggerFuture")
  8878  		return
  8879  	}
  8880  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8881  	if stgr.Response.Response, err = future.GetResult(sender); err == nil && stgr.Response.Response.StatusCode != http.StatusNoContent {
  8882  		stgr, err = client.CreateUpdateSQLTriggerResponder(stgr.Response.Response)
  8883  		if err != nil {
  8884  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", stgr.Response.Response, "Failure responding to request")
  8885  		}
  8886  	}
  8887  	return
  8888  }
  8889  
  8890  // SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the
  8891  // results of a long-running operation.
  8892  type SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture struct {
  8893  	azure.FutureAPI
  8894  	// Result returns the result of the asynchronous operation.
  8895  	// If the operation has not completed it will return an error.
  8896  	Result func(SQLResourcesClient) (SQLUserDefinedFunctionGetResults, error)
  8897  }
  8898  
  8899  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8900  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
  8901  	var azFuture azure.Future
  8902  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8903  		return err
  8904  	}
  8905  	future.FutureAPI = &azFuture
  8906  	future.Result = future.result
  8907  	return nil
  8908  }
  8909  
  8910  // result is the default implementation for SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture.Result.
  8911  func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (sudfgr SQLUserDefinedFunctionGetResults, err error) {
  8912  	var done bool
  8913  	done, err = future.DoneWithContext(context.Background(), client)
  8914  	if err != nil {
  8915  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
  8916  		return
  8917  	}
  8918  	if !done {
  8919  		sudfgr.Response.Response = future.Response()
  8920  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture")
  8921  		return
  8922  	}
  8923  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8924  	if sudfgr.Response.Response, err = future.GetResult(sender); err == nil && sudfgr.Response.Response.StatusCode != http.StatusNoContent {
  8925  		sudfgr, err = client.CreateUpdateSQLUserDefinedFunctionResponder(sudfgr.Response.Response)
  8926  		if err != nil {
  8927  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", sudfgr.Response.Response, "Failure responding to request")
  8928  		}
  8929  	}
  8930  	return
  8931  }
  8932  
  8933  // SQLResourcesDeleteSQLContainerFuture an abstraction for monitoring and retrieving the results of a
  8934  // long-running operation.
  8935  type SQLResourcesDeleteSQLContainerFuture struct {
  8936  	azure.FutureAPI
  8937  	// Result returns the result of the asynchronous operation.
  8938  	// If the operation has not completed it will return an error.
  8939  	Result func(SQLResourcesClient) (autorest.Response, error)
  8940  }
  8941  
  8942  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8943  func (future *SQLResourcesDeleteSQLContainerFuture) UnmarshalJSON(body []byte) error {
  8944  	var azFuture azure.Future
  8945  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8946  		return err
  8947  	}
  8948  	future.FutureAPI = &azFuture
  8949  	future.Result = future.result
  8950  	return nil
  8951  }
  8952  
  8953  // result is the default implementation for SQLResourcesDeleteSQLContainerFuture.Result.
  8954  func (future *SQLResourcesDeleteSQLContainerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  8955  	var done bool
  8956  	done, err = future.DoneWithContext(context.Background(), client)
  8957  	if err != nil {
  8958  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLContainerFuture", "Result", future.Response(), "Polling failure")
  8959  		return
  8960  	}
  8961  	if !done {
  8962  		ar.Response = future.Response()
  8963  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLContainerFuture")
  8964  		return
  8965  	}
  8966  	ar.Response = future.Response()
  8967  	return
  8968  }
  8969  
  8970  // SQLResourcesDeleteSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
  8971  // long-running operation.
  8972  type SQLResourcesDeleteSQLDatabaseFuture struct {
  8973  	azure.FutureAPI
  8974  	// Result returns the result of the asynchronous operation.
  8975  	// If the operation has not completed it will return an error.
  8976  	Result func(SQLResourcesClient) (autorest.Response, error)
  8977  }
  8978  
  8979  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8980  func (future *SQLResourcesDeleteSQLDatabaseFuture) UnmarshalJSON(body []byte) error {
  8981  	var azFuture azure.Future
  8982  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8983  		return err
  8984  	}
  8985  	future.FutureAPI = &azFuture
  8986  	future.Result = future.result
  8987  	return nil
  8988  }
  8989  
  8990  // result is the default implementation for SQLResourcesDeleteSQLDatabaseFuture.Result.
  8991  func (future *SQLResourcesDeleteSQLDatabaseFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  8992  	var done bool
  8993  	done, err = future.DoneWithContext(context.Background(), client)
  8994  	if err != nil {
  8995  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
  8996  		return
  8997  	}
  8998  	if !done {
  8999  		ar.Response = future.Response()
  9000  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLDatabaseFuture")
  9001  		return
  9002  	}
  9003  	ar.Response = future.Response()
  9004  	return
  9005  }
  9006  
  9007  // SQLResourcesDeleteSQLRoleAssignmentFuture an abstraction for monitoring and retrieving the results of a
  9008  // long-running operation.
  9009  type SQLResourcesDeleteSQLRoleAssignmentFuture struct {
  9010  	azure.FutureAPI
  9011  	// Result returns the result of the asynchronous operation.
  9012  	// If the operation has not completed it will return an error.
  9013  	Result func(SQLResourcesClient) (autorest.Response, error)
  9014  }
  9015  
  9016  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9017  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) UnmarshalJSON(body []byte) error {
  9018  	var azFuture azure.Future
  9019  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9020  		return err
  9021  	}
  9022  	future.FutureAPI = &azFuture
  9023  	future.Result = future.result
  9024  	return nil
  9025  }
  9026  
  9027  // result is the default implementation for SQLResourcesDeleteSQLRoleAssignmentFuture.Result.
  9028  func (future *SQLResourcesDeleteSQLRoleAssignmentFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  9029  	var done bool
  9030  	done, err = future.DoneWithContext(context.Background(), client)
  9031  	if err != nil {
  9032  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture", "Result", future.Response(), "Polling failure")
  9033  		return
  9034  	}
  9035  	if !done {
  9036  		ar.Response = future.Response()
  9037  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleAssignmentFuture")
  9038  		return
  9039  	}
  9040  	ar.Response = future.Response()
  9041  	return
  9042  }
  9043  
  9044  // SQLResourcesDeleteSQLRoleDefinitionFuture an abstraction for monitoring and retrieving the results of a
  9045  // long-running operation.
  9046  type SQLResourcesDeleteSQLRoleDefinitionFuture struct {
  9047  	azure.FutureAPI
  9048  	// Result returns the result of the asynchronous operation.
  9049  	// If the operation has not completed it will return an error.
  9050  	Result func(SQLResourcesClient) (autorest.Response, error)
  9051  }
  9052  
  9053  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9054  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) UnmarshalJSON(body []byte) error {
  9055  	var azFuture azure.Future
  9056  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9057  		return err
  9058  	}
  9059  	future.FutureAPI = &azFuture
  9060  	future.Result = future.result
  9061  	return nil
  9062  }
  9063  
  9064  // result is the default implementation for SQLResourcesDeleteSQLRoleDefinitionFuture.Result.
  9065  func (future *SQLResourcesDeleteSQLRoleDefinitionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  9066  	var done bool
  9067  	done, err = future.DoneWithContext(context.Background(), client)
  9068  	if err != nil {
  9069  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture", "Result", future.Response(), "Polling failure")
  9070  		return
  9071  	}
  9072  	if !done {
  9073  		ar.Response = future.Response()
  9074  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLRoleDefinitionFuture")
  9075  		return
  9076  	}
  9077  	ar.Response = future.Response()
  9078  	return
  9079  }
  9080  
  9081  // SQLResourcesDeleteSQLStoredProcedureFuture an abstraction for monitoring and retrieving the results of a
  9082  // long-running operation.
  9083  type SQLResourcesDeleteSQLStoredProcedureFuture struct {
  9084  	azure.FutureAPI
  9085  	// Result returns the result of the asynchronous operation.
  9086  	// If the operation has not completed it will return an error.
  9087  	Result func(SQLResourcesClient) (autorest.Response, error)
  9088  }
  9089  
  9090  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9091  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) UnmarshalJSON(body []byte) error {
  9092  	var azFuture azure.Future
  9093  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9094  		return err
  9095  	}
  9096  	future.FutureAPI = &azFuture
  9097  	future.Result = future.result
  9098  	return nil
  9099  }
  9100  
  9101  // result is the default implementation for SQLResourcesDeleteSQLStoredProcedureFuture.Result.
  9102  func (future *SQLResourcesDeleteSQLStoredProcedureFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  9103  	var done bool
  9104  	done, err = future.DoneWithContext(context.Background(), client)
  9105  	if err != nil {
  9106  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure")
  9107  		return
  9108  	}
  9109  	if !done {
  9110  		ar.Response = future.Response()
  9111  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLStoredProcedureFuture")
  9112  		return
  9113  	}
  9114  	ar.Response = future.Response()
  9115  	return
  9116  }
  9117  
  9118  // SQLResourcesDeleteSQLTriggerFuture an abstraction for monitoring and retrieving the results of a
  9119  // long-running operation.
  9120  type SQLResourcesDeleteSQLTriggerFuture struct {
  9121  	azure.FutureAPI
  9122  	// Result returns the result of the asynchronous operation.
  9123  	// If the operation has not completed it will return an error.
  9124  	Result func(SQLResourcesClient) (autorest.Response, error)
  9125  }
  9126  
  9127  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9128  func (future *SQLResourcesDeleteSQLTriggerFuture) UnmarshalJSON(body []byte) error {
  9129  	var azFuture azure.Future
  9130  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9131  		return err
  9132  	}
  9133  	future.FutureAPI = &azFuture
  9134  	future.Result = future.result
  9135  	return nil
  9136  }
  9137  
  9138  // result is the default implementation for SQLResourcesDeleteSQLTriggerFuture.Result.
  9139  func (future *SQLResourcesDeleteSQLTriggerFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  9140  	var done bool
  9141  	done, err = future.DoneWithContext(context.Background(), client)
  9142  	if err != nil {
  9143  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLTriggerFuture", "Result", future.Response(), "Polling failure")
  9144  		return
  9145  	}
  9146  	if !done {
  9147  		ar.Response = future.Response()
  9148  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLTriggerFuture")
  9149  		return
  9150  	}
  9151  	ar.Response = future.Response()
  9152  	return
  9153  }
  9154  
  9155  // SQLResourcesDeleteSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the results
  9156  // of a long-running operation.
  9157  type SQLResourcesDeleteSQLUserDefinedFunctionFuture struct {
  9158  	azure.FutureAPI
  9159  	// Result returns the result of the asynchronous operation.
  9160  	// If the operation has not completed it will return an error.
  9161  	Result func(SQLResourcesClient) (autorest.Response, error)
  9162  }
  9163  
  9164  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9165  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) UnmarshalJSON(body []byte) error {
  9166  	var azFuture azure.Future
  9167  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9168  		return err
  9169  	}
  9170  	future.FutureAPI = &azFuture
  9171  	future.Result = future.result
  9172  	return nil
  9173  }
  9174  
  9175  // result is the default implementation for SQLResourcesDeleteSQLUserDefinedFunctionFuture.Result.
  9176  func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) result(client SQLResourcesClient) (ar autorest.Response, err error) {
  9177  	var done bool
  9178  	done, err = future.DoneWithContext(context.Background(), client)
  9179  	if err != nil {
  9180  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure")
  9181  		return
  9182  	}
  9183  	if !done {
  9184  		ar.Response = future.Response()
  9185  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture")
  9186  		return
  9187  	}
  9188  	ar.Response = future.Response()
  9189  	return
  9190  }
  9191  
  9192  // SQLResourcesMigrateSQLContainerToAutoscaleFuture an abstraction for monitoring and retrieving the
  9193  // results of a long-running operation.
  9194  type SQLResourcesMigrateSQLContainerToAutoscaleFuture struct {
  9195  	azure.FutureAPI
  9196  	// Result returns the result of the asynchronous operation.
  9197  	// If the operation has not completed it will return an error.
  9198  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9199  }
  9200  
  9201  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9202  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  9203  	var azFuture azure.Future
  9204  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9205  		return err
  9206  	}
  9207  	future.FutureAPI = &azFuture
  9208  	future.Result = future.result
  9209  	return nil
  9210  }
  9211  
  9212  // result is the default implementation for SQLResourcesMigrateSQLContainerToAutoscaleFuture.Result.
  9213  func (future *SQLResourcesMigrateSQLContainerToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9214  	var done bool
  9215  	done, err = future.DoneWithContext(context.Background(), client)
  9216  	if err != nil {
  9217  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  9218  		return
  9219  	}
  9220  	if !done {
  9221  		tsgr.Response.Response = future.Response()
  9222  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture")
  9223  		return
  9224  	}
  9225  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9226  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9227  		tsgr, err = client.MigrateSQLContainerToAutoscaleResponder(tsgr.Response.Response)
  9228  		if err != nil {
  9229  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9230  		}
  9231  	}
  9232  	return
  9233  }
  9234  
  9235  // SQLResourcesMigrateSQLContainerToManualThroughputFuture an abstraction for monitoring and retrieving the
  9236  // results of a long-running operation.
  9237  type SQLResourcesMigrateSQLContainerToManualThroughputFuture struct {
  9238  	azure.FutureAPI
  9239  	// Result returns the result of the asynchronous operation.
  9240  	// If the operation has not completed it will return an error.
  9241  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9242  }
  9243  
  9244  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9245  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  9246  	var azFuture azure.Future
  9247  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9248  		return err
  9249  	}
  9250  	future.FutureAPI = &azFuture
  9251  	future.Result = future.result
  9252  	return nil
  9253  }
  9254  
  9255  // result is the default implementation for SQLResourcesMigrateSQLContainerToManualThroughputFuture.Result.
  9256  func (future *SQLResourcesMigrateSQLContainerToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9257  	var done bool
  9258  	done, err = future.DoneWithContext(context.Background(), client)
  9259  	if err != nil {
  9260  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  9261  		return
  9262  	}
  9263  	if !done {
  9264  		tsgr.Response.Response = future.Response()
  9265  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture")
  9266  		return
  9267  	}
  9268  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9269  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9270  		tsgr, err = client.MigrateSQLContainerToManualThroughputResponder(tsgr.Response.Response)
  9271  		if err != nil {
  9272  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLContainerToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9273  		}
  9274  	}
  9275  	return
  9276  }
  9277  
  9278  // SQLResourcesMigrateSQLDatabaseToAutoscaleFuture an abstraction for monitoring and retrieving the results
  9279  // of a long-running operation.
  9280  type SQLResourcesMigrateSQLDatabaseToAutoscaleFuture struct {
  9281  	azure.FutureAPI
  9282  	// Result returns the result of the asynchronous operation.
  9283  	// If the operation has not completed it will return an error.
  9284  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9285  }
  9286  
  9287  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9288  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) UnmarshalJSON(body []byte) error {
  9289  	var azFuture azure.Future
  9290  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9291  		return err
  9292  	}
  9293  	future.FutureAPI = &azFuture
  9294  	future.Result = future.result
  9295  	return nil
  9296  }
  9297  
  9298  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToAutoscaleFuture.Result.
  9299  func (future *SQLResourcesMigrateSQLDatabaseToAutoscaleFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9300  	var done bool
  9301  	done, err = future.DoneWithContext(context.Background(), client)
  9302  	if err != nil {
  9303  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", future.Response(), "Polling failure")
  9304  		return
  9305  	}
  9306  	if !done {
  9307  		tsgr.Response.Response = future.Response()
  9308  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture")
  9309  		return
  9310  	}
  9311  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9312  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9313  		tsgr, err = client.MigrateSQLDatabaseToAutoscaleResponder(tsgr.Response.Response)
  9314  		if err != nil {
  9315  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9316  		}
  9317  	}
  9318  	return
  9319  }
  9320  
  9321  // SQLResourcesMigrateSQLDatabaseToManualThroughputFuture an abstraction for monitoring and retrieving the
  9322  // results of a long-running operation.
  9323  type SQLResourcesMigrateSQLDatabaseToManualThroughputFuture struct {
  9324  	azure.FutureAPI
  9325  	// Result returns the result of the asynchronous operation.
  9326  	// If the operation has not completed it will return an error.
  9327  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9328  }
  9329  
  9330  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9331  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) UnmarshalJSON(body []byte) error {
  9332  	var azFuture azure.Future
  9333  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9334  		return err
  9335  	}
  9336  	future.FutureAPI = &azFuture
  9337  	future.Result = future.result
  9338  	return nil
  9339  }
  9340  
  9341  // result is the default implementation for SQLResourcesMigrateSQLDatabaseToManualThroughputFuture.Result.
  9342  func (future *SQLResourcesMigrateSQLDatabaseToManualThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9343  	var done bool
  9344  	done, err = future.DoneWithContext(context.Background(), client)
  9345  	if err != nil {
  9346  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", future.Response(), "Polling failure")
  9347  		return
  9348  	}
  9349  	if !done {
  9350  		tsgr.Response.Response = future.Response()
  9351  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture")
  9352  		return
  9353  	}
  9354  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9355  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9356  		tsgr, err = client.MigrateSQLDatabaseToManualThroughputResponder(tsgr.Response.Response)
  9357  		if err != nil {
  9358  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesMigrateSQLDatabaseToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9359  		}
  9360  	}
  9361  	return
  9362  }
  9363  
  9364  // SQLResourcesRetrieveContinuousBackupInformationFuture an abstraction for monitoring and retrieving the
  9365  // results of a long-running operation.
  9366  type SQLResourcesRetrieveContinuousBackupInformationFuture struct {
  9367  	azure.FutureAPI
  9368  	// Result returns the result of the asynchronous operation.
  9369  	// If the operation has not completed it will return an error.
  9370  	Result func(SQLResourcesClient) (BackupInformation, error)
  9371  }
  9372  
  9373  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9374  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) UnmarshalJSON(body []byte) error {
  9375  	var azFuture azure.Future
  9376  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9377  		return err
  9378  	}
  9379  	future.FutureAPI = &azFuture
  9380  	future.Result = future.result
  9381  	return nil
  9382  }
  9383  
  9384  // result is the default implementation for SQLResourcesRetrieveContinuousBackupInformationFuture.Result.
  9385  func (future *SQLResourcesRetrieveContinuousBackupInformationFuture) result(client SQLResourcesClient) (bi BackupInformation, err error) {
  9386  	var done bool
  9387  	done, err = future.DoneWithContext(context.Background(), client)
  9388  	if err != nil {
  9389  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", future.Response(), "Polling failure")
  9390  		return
  9391  	}
  9392  	if !done {
  9393  		bi.Response.Response = future.Response()
  9394  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture")
  9395  		return
  9396  	}
  9397  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9398  	if bi.Response.Response, err = future.GetResult(sender); err == nil && bi.Response.Response.StatusCode != http.StatusNoContent {
  9399  		bi, err = client.RetrieveContinuousBackupInformationResponder(bi.Response.Response)
  9400  		if err != nil {
  9401  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesRetrieveContinuousBackupInformationFuture", "Result", bi.Response.Response, "Failure responding to request")
  9402  		}
  9403  	}
  9404  	return
  9405  }
  9406  
  9407  // SQLResourcesUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the results
  9408  // of a long-running operation.
  9409  type SQLResourcesUpdateSQLContainerThroughputFuture struct {
  9410  	azure.FutureAPI
  9411  	// Result returns the result of the asynchronous operation.
  9412  	// If the operation has not completed it will return an error.
  9413  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9414  }
  9415  
  9416  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9417  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) UnmarshalJSON(body []byte) error {
  9418  	var azFuture azure.Future
  9419  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9420  		return err
  9421  	}
  9422  	future.FutureAPI = &azFuture
  9423  	future.Result = future.result
  9424  	return nil
  9425  }
  9426  
  9427  // result is the default implementation for SQLResourcesUpdateSQLContainerThroughputFuture.Result.
  9428  func (future *SQLResourcesUpdateSQLContainerThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9429  	var done bool
  9430  	done, err = future.DoneWithContext(context.Background(), client)
  9431  	if err != nil {
  9432  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", future.Response(), "Polling failure")
  9433  		return
  9434  	}
  9435  	if !done {
  9436  		tsgr.Response.Response = future.Response()
  9437  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLContainerThroughputFuture")
  9438  		return
  9439  	}
  9440  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9441  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9442  		tsgr, err = client.UpdateSQLContainerThroughputResponder(tsgr.Response.Response)
  9443  		if err != nil {
  9444  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9445  		}
  9446  	}
  9447  	return
  9448  }
  9449  
  9450  // SQLResourcesUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the results
  9451  // of a long-running operation.
  9452  type SQLResourcesUpdateSQLDatabaseThroughputFuture struct {
  9453  	azure.FutureAPI
  9454  	// Result returns the result of the asynchronous operation.
  9455  	// If the operation has not completed it will return an error.
  9456  	Result func(SQLResourcesClient) (ThroughputSettingsGetResults, error)
  9457  }
  9458  
  9459  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  9460  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) UnmarshalJSON(body []byte) error {
  9461  	var azFuture azure.Future
  9462  	if err := json.Unmarshal(body, &azFuture); err != nil {
  9463  		return err
  9464  	}
  9465  	future.FutureAPI = &azFuture
  9466  	future.Result = future.result
  9467  	return nil
  9468  }
  9469  
  9470  // result is the default implementation for SQLResourcesUpdateSQLDatabaseThroughputFuture.Result.
  9471  func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
  9472  	var done bool
  9473  	done, err = future.DoneWithContext(context.Background(), client)
  9474  	if err != nil {
  9475  		err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
  9476  		return
  9477  	}
  9478  	if !done {
  9479  		tsgr.Response.Response = future.Response()
  9480  		err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture")
  9481  		return
  9482  	}
  9483  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  9484  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
  9485  		tsgr, err = client.UpdateSQLDatabaseThroughputResponder(tsgr.Response.Response)
  9486  		if err != nil {
  9487  			err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
  9488  		}
  9489  	}
  9490  	return
  9491  }
  9492  
  9493  // SQLRoleAssignmentCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
  9494  // Assignment.
  9495  type SQLRoleAssignmentCreateUpdateParameters struct {
  9496  	// SQLRoleAssignmentResource - Properties to create and update an Azure Cosmos DB SQL Role Assignment.
  9497  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
  9498  }
  9499  
  9500  // MarshalJSON is the custom marshaler for SQLRoleAssignmentCreateUpdateParameters.
  9501  func (sracup SQLRoleAssignmentCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9502  	objectMap := make(map[string]interface{})
  9503  	if sracup.SQLRoleAssignmentResource != nil {
  9504  		objectMap["properties"] = sracup.SQLRoleAssignmentResource
  9505  	}
  9506  	return json.Marshal(objectMap)
  9507  }
  9508  
  9509  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentCreateUpdateParameters struct.
  9510  func (sracup *SQLRoleAssignmentCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9511  	var m map[string]*json.RawMessage
  9512  	err := json.Unmarshal(body, &m)
  9513  	if err != nil {
  9514  		return err
  9515  	}
  9516  	for k, v := range m {
  9517  		switch k {
  9518  		case "properties":
  9519  			if v != nil {
  9520  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
  9521  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
  9522  				if err != nil {
  9523  					return err
  9524  				}
  9525  				sracup.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
  9526  			}
  9527  		}
  9528  	}
  9529  
  9530  	return nil
  9531  }
  9532  
  9533  // SQLRoleAssignmentGetResults an Azure Cosmos DB Role Assignment
  9534  type SQLRoleAssignmentGetResults struct {
  9535  	autorest.Response `json:"-"`
  9536  	// SQLRoleAssignmentResource - Properties related to the Role Assignment.
  9537  	*SQLRoleAssignmentResource `json:"properties,omitempty"`
  9538  	// ID - READ-ONLY; The unique resource identifier of the database account.
  9539  	ID *string `json:"id,omitempty"`
  9540  	// Name - READ-ONLY; The name of the database account.
  9541  	Name *string `json:"name,omitempty"`
  9542  	// Type - READ-ONLY; The type of Azure resource.
  9543  	Type *string `json:"type,omitempty"`
  9544  }
  9545  
  9546  // MarshalJSON is the custom marshaler for SQLRoleAssignmentGetResults.
  9547  func (sragr SQLRoleAssignmentGetResults) MarshalJSON() ([]byte, error) {
  9548  	objectMap := make(map[string]interface{})
  9549  	if sragr.SQLRoleAssignmentResource != nil {
  9550  		objectMap["properties"] = sragr.SQLRoleAssignmentResource
  9551  	}
  9552  	return json.Marshal(objectMap)
  9553  }
  9554  
  9555  // UnmarshalJSON is the custom unmarshaler for SQLRoleAssignmentGetResults struct.
  9556  func (sragr *SQLRoleAssignmentGetResults) UnmarshalJSON(body []byte) error {
  9557  	var m map[string]*json.RawMessage
  9558  	err := json.Unmarshal(body, &m)
  9559  	if err != nil {
  9560  		return err
  9561  	}
  9562  	for k, v := range m {
  9563  		switch k {
  9564  		case "properties":
  9565  			if v != nil {
  9566  				var SQLRoleAssignmentResource SQLRoleAssignmentResource
  9567  				err = json.Unmarshal(*v, &SQLRoleAssignmentResource)
  9568  				if err != nil {
  9569  					return err
  9570  				}
  9571  				sragr.SQLRoleAssignmentResource = &SQLRoleAssignmentResource
  9572  			}
  9573  		case "id":
  9574  			if v != nil {
  9575  				var ID string
  9576  				err = json.Unmarshal(*v, &ID)
  9577  				if err != nil {
  9578  					return err
  9579  				}
  9580  				sragr.ID = &ID
  9581  			}
  9582  		case "name":
  9583  			if v != nil {
  9584  				var name string
  9585  				err = json.Unmarshal(*v, &name)
  9586  				if err != nil {
  9587  					return err
  9588  				}
  9589  				sragr.Name = &name
  9590  			}
  9591  		case "type":
  9592  			if v != nil {
  9593  				var typeVar string
  9594  				err = json.Unmarshal(*v, &typeVar)
  9595  				if err != nil {
  9596  					return err
  9597  				}
  9598  				sragr.Type = &typeVar
  9599  			}
  9600  		}
  9601  	}
  9602  
  9603  	return nil
  9604  }
  9605  
  9606  // SQLRoleAssignmentListResult the relevant Role Assignments.
  9607  type SQLRoleAssignmentListResult struct {
  9608  	autorest.Response `json:"-"`
  9609  	// Value - READ-ONLY; List of Role Assignments and their properties
  9610  	Value *[]SQLRoleAssignmentGetResults `json:"value,omitempty"`
  9611  }
  9612  
  9613  // MarshalJSON is the custom marshaler for SQLRoleAssignmentListResult.
  9614  func (sralr SQLRoleAssignmentListResult) MarshalJSON() ([]byte, error) {
  9615  	objectMap := make(map[string]interface{})
  9616  	return json.Marshal(objectMap)
  9617  }
  9618  
  9619  // SQLRoleAssignmentResource azure Cosmos DB SQL Role Assignment resource object.
  9620  type SQLRoleAssignmentResource struct {
  9621  	// RoleDefinitionID - The unique identifier for the associated Role Definition.
  9622  	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
  9623  	// Scope - The data plane resource path for which access is being granted through this Role Assignment.
  9624  	Scope *string `json:"scope,omitempty"`
  9625  	// 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.
  9626  	PrincipalID *string `json:"principalId,omitempty"`
  9627  }
  9628  
  9629  // SQLRoleDefinitionCreateUpdateParameters parameters to create and update an Azure Cosmos DB SQL Role
  9630  // Definition.
  9631  type SQLRoleDefinitionCreateUpdateParameters struct {
  9632  	// SQLRoleDefinitionResource - Properties to create and update an Azure Cosmos DB SQL Role Definition.
  9633  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
  9634  }
  9635  
  9636  // MarshalJSON is the custom marshaler for SQLRoleDefinitionCreateUpdateParameters.
  9637  func (srdcup SQLRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9638  	objectMap := make(map[string]interface{})
  9639  	if srdcup.SQLRoleDefinitionResource != nil {
  9640  		objectMap["properties"] = srdcup.SQLRoleDefinitionResource
  9641  	}
  9642  	return json.Marshal(objectMap)
  9643  }
  9644  
  9645  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionCreateUpdateParameters struct.
  9646  func (srdcup *SQLRoleDefinitionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9647  	var m map[string]*json.RawMessage
  9648  	err := json.Unmarshal(body, &m)
  9649  	if err != nil {
  9650  		return err
  9651  	}
  9652  	for k, v := range m {
  9653  		switch k {
  9654  		case "properties":
  9655  			if v != nil {
  9656  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
  9657  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
  9658  				if err != nil {
  9659  					return err
  9660  				}
  9661  				srdcup.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
  9662  			}
  9663  		}
  9664  	}
  9665  
  9666  	return nil
  9667  }
  9668  
  9669  // SQLRoleDefinitionGetResults an Azure Cosmos DB SQL Role Definition.
  9670  type SQLRoleDefinitionGetResults struct {
  9671  	autorest.Response `json:"-"`
  9672  	// SQLRoleDefinitionResource - Properties related to the Role Definition.
  9673  	*SQLRoleDefinitionResource `json:"properties,omitempty"`
  9674  	// ID - READ-ONLY; The unique resource identifier of the database account.
  9675  	ID *string `json:"id,omitempty"`
  9676  	// Name - READ-ONLY; The name of the database account.
  9677  	Name *string `json:"name,omitempty"`
  9678  	// Type - READ-ONLY; The type of Azure resource.
  9679  	Type *string `json:"type,omitempty"`
  9680  }
  9681  
  9682  // MarshalJSON is the custom marshaler for SQLRoleDefinitionGetResults.
  9683  func (srdgr SQLRoleDefinitionGetResults) MarshalJSON() ([]byte, error) {
  9684  	objectMap := make(map[string]interface{})
  9685  	if srdgr.SQLRoleDefinitionResource != nil {
  9686  		objectMap["properties"] = srdgr.SQLRoleDefinitionResource
  9687  	}
  9688  	return json.Marshal(objectMap)
  9689  }
  9690  
  9691  // UnmarshalJSON is the custom unmarshaler for SQLRoleDefinitionGetResults struct.
  9692  func (srdgr *SQLRoleDefinitionGetResults) UnmarshalJSON(body []byte) error {
  9693  	var m map[string]*json.RawMessage
  9694  	err := json.Unmarshal(body, &m)
  9695  	if err != nil {
  9696  		return err
  9697  	}
  9698  	for k, v := range m {
  9699  		switch k {
  9700  		case "properties":
  9701  			if v != nil {
  9702  				var SQLRoleDefinitionResource SQLRoleDefinitionResource
  9703  				err = json.Unmarshal(*v, &SQLRoleDefinitionResource)
  9704  				if err != nil {
  9705  					return err
  9706  				}
  9707  				srdgr.SQLRoleDefinitionResource = &SQLRoleDefinitionResource
  9708  			}
  9709  		case "id":
  9710  			if v != nil {
  9711  				var ID string
  9712  				err = json.Unmarshal(*v, &ID)
  9713  				if err != nil {
  9714  					return err
  9715  				}
  9716  				srdgr.ID = &ID
  9717  			}
  9718  		case "name":
  9719  			if v != nil {
  9720  				var name string
  9721  				err = json.Unmarshal(*v, &name)
  9722  				if err != nil {
  9723  					return err
  9724  				}
  9725  				srdgr.Name = &name
  9726  			}
  9727  		case "type":
  9728  			if v != nil {
  9729  				var typeVar string
  9730  				err = json.Unmarshal(*v, &typeVar)
  9731  				if err != nil {
  9732  					return err
  9733  				}
  9734  				srdgr.Type = &typeVar
  9735  			}
  9736  		}
  9737  	}
  9738  
  9739  	return nil
  9740  }
  9741  
  9742  // SQLRoleDefinitionListResult the relevant Role Definitions.
  9743  type SQLRoleDefinitionListResult struct {
  9744  	autorest.Response `json:"-"`
  9745  	// Value - READ-ONLY; List of Role Definitions and their properties.
  9746  	Value *[]SQLRoleDefinitionGetResults `json:"value,omitempty"`
  9747  }
  9748  
  9749  // MarshalJSON is the custom marshaler for SQLRoleDefinitionListResult.
  9750  func (srdlr SQLRoleDefinitionListResult) MarshalJSON() ([]byte, error) {
  9751  	objectMap := make(map[string]interface{})
  9752  	return json.Marshal(objectMap)
  9753  }
  9754  
  9755  // SQLRoleDefinitionResource azure Cosmos DB SQL Role Definition resource object.
  9756  type SQLRoleDefinitionResource struct {
  9757  	// RoleName - A user-friendly name for the Role Definition. Must be unique for the database account.
  9758  	RoleName *string `json:"roleName,omitempty"`
  9759  	// Type - Indicates whether the Role Definition was built-in or user created. Possible values include: 'RoleDefinitionTypeBuiltInRole', 'RoleDefinitionTypeCustomRole'
  9760  	Type RoleDefinitionType `json:"type,omitempty"`
  9761  	// 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.
  9762  	AssignableScopes *[]string `json:"assignableScopes,omitempty"`
  9763  	// Permissions - The set of operations allowed through this Role Definition.
  9764  	Permissions *[]Permission `json:"permissions,omitempty"`
  9765  }
  9766  
  9767  // SQLStoredProcedureCreateUpdateParameters parameters to create and update Cosmos DB storedProcedure.
  9768  type SQLStoredProcedureCreateUpdateParameters struct {
  9769  	// SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure.
  9770  	*SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"`
  9771  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9772  	ID *string `json:"id,omitempty"`
  9773  	// Name - READ-ONLY; The name of the ARM resource.
  9774  	Name *string `json:"name,omitempty"`
  9775  	// Type - READ-ONLY; The type of Azure resource.
  9776  	Type *string `json:"type,omitempty"`
  9777  	// Location - The location of the resource group to which the resource belongs.
  9778  	Location *string            `json:"location,omitempty"`
  9779  	Tags     map[string]*string `json:"tags"`
  9780  }
  9781  
  9782  // MarshalJSON is the custom marshaler for SQLStoredProcedureCreateUpdateParameters.
  9783  func (sspcup SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error) {
  9784  	objectMap := make(map[string]interface{})
  9785  	if sspcup.SQLStoredProcedureCreateUpdateProperties != nil {
  9786  		objectMap["properties"] = sspcup.SQLStoredProcedureCreateUpdateProperties
  9787  	}
  9788  	if sspcup.Location != nil {
  9789  		objectMap["location"] = sspcup.Location
  9790  	}
  9791  	if sspcup.Tags != nil {
  9792  		objectMap["tags"] = sspcup.Tags
  9793  	}
  9794  	return json.Marshal(objectMap)
  9795  }
  9796  
  9797  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureCreateUpdateParameters struct.
  9798  func (sspcup *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(body []byte) error {
  9799  	var m map[string]*json.RawMessage
  9800  	err := json.Unmarshal(body, &m)
  9801  	if err != nil {
  9802  		return err
  9803  	}
  9804  	for k, v := range m {
  9805  		switch k {
  9806  		case "properties":
  9807  			if v != nil {
  9808  				var SQLStoredProcedureCreateUpdateProperties SQLStoredProcedureCreateUpdateProperties
  9809  				err = json.Unmarshal(*v, &SQLStoredProcedureCreateUpdateProperties)
  9810  				if err != nil {
  9811  					return err
  9812  				}
  9813  				sspcup.SQLStoredProcedureCreateUpdateProperties = &SQLStoredProcedureCreateUpdateProperties
  9814  			}
  9815  		case "id":
  9816  			if v != nil {
  9817  				var ID string
  9818  				err = json.Unmarshal(*v, &ID)
  9819  				if err != nil {
  9820  					return err
  9821  				}
  9822  				sspcup.ID = &ID
  9823  			}
  9824  		case "name":
  9825  			if v != nil {
  9826  				var name string
  9827  				err = json.Unmarshal(*v, &name)
  9828  				if err != nil {
  9829  					return err
  9830  				}
  9831  				sspcup.Name = &name
  9832  			}
  9833  		case "type":
  9834  			if v != nil {
  9835  				var typeVar string
  9836  				err = json.Unmarshal(*v, &typeVar)
  9837  				if err != nil {
  9838  					return err
  9839  				}
  9840  				sspcup.Type = &typeVar
  9841  			}
  9842  		case "location":
  9843  			if v != nil {
  9844  				var location string
  9845  				err = json.Unmarshal(*v, &location)
  9846  				if err != nil {
  9847  					return err
  9848  				}
  9849  				sspcup.Location = &location
  9850  			}
  9851  		case "tags":
  9852  			if v != nil {
  9853  				var tags map[string]*string
  9854  				err = json.Unmarshal(*v, &tags)
  9855  				if err != nil {
  9856  					return err
  9857  				}
  9858  				sspcup.Tags = tags
  9859  			}
  9860  		}
  9861  	}
  9862  
  9863  	return nil
  9864  }
  9865  
  9866  // SQLStoredProcedureCreateUpdateProperties properties to create and update Azure Cosmos DB
  9867  // storedProcedure.
  9868  type SQLStoredProcedureCreateUpdateProperties struct {
  9869  	// Resource - The standard JSON format of a storedProcedure
  9870  	Resource *SQLStoredProcedureResource `json:"resource,omitempty"`
  9871  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
  9872  	Options *CreateUpdateOptions `json:"options,omitempty"`
  9873  }
  9874  
  9875  // SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure
  9876  type SQLStoredProcedureGetProperties struct {
  9877  	Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"`
  9878  }
  9879  
  9880  // SQLStoredProcedureGetPropertiesResource ...
  9881  type SQLStoredProcedureGetPropertiesResource struct {
  9882  	// ID - Name of the Cosmos DB SQL storedProcedure
  9883  	ID *string `json:"id,omitempty"`
  9884  	// Body - Body of the Stored Procedure
  9885  	Body *string `json:"body,omitempty"`
  9886  	// Rid - READ-ONLY; A system generated property. A unique identifier.
  9887  	Rid *string `json:"_rid,omitempty"`
  9888  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
  9889  	Ts *float64 `json:"_ts,omitempty"`
  9890  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
  9891  	Etag *string `json:"_etag,omitempty"`
  9892  }
  9893  
  9894  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetPropertiesResource.
  9895  func (sspgp SQLStoredProcedureGetPropertiesResource) MarshalJSON() ([]byte, error) {
  9896  	objectMap := make(map[string]interface{})
  9897  	if sspgp.ID != nil {
  9898  		objectMap["id"] = sspgp.ID
  9899  	}
  9900  	if sspgp.Body != nil {
  9901  		objectMap["body"] = sspgp.Body
  9902  	}
  9903  	return json.Marshal(objectMap)
  9904  }
  9905  
  9906  // SQLStoredProcedureGetResults an Azure Cosmos DB storedProcedure.
  9907  type SQLStoredProcedureGetResults struct {
  9908  	autorest.Response `json:"-"`
  9909  	// SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB storedProcedure
  9910  	*SQLStoredProcedureGetProperties `json:"properties,omitempty"`
  9911  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
  9912  	ID *string `json:"id,omitempty"`
  9913  	// Name - READ-ONLY; The name of the ARM resource.
  9914  	Name *string `json:"name,omitempty"`
  9915  	// Type - READ-ONLY; The type of Azure resource.
  9916  	Type *string `json:"type,omitempty"`
  9917  	// Location - The location of the resource group to which the resource belongs.
  9918  	Location *string            `json:"location,omitempty"`
  9919  	Tags     map[string]*string `json:"tags"`
  9920  }
  9921  
  9922  // MarshalJSON is the custom marshaler for SQLStoredProcedureGetResults.
  9923  func (sspgr SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error) {
  9924  	objectMap := make(map[string]interface{})
  9925  	if sspgr.SQLStoredProcedureGetProperties != nil {
  9926  		objectMap["properties"] = sspgr.SQLStoredProcedureGetProperties
  9927  	}
  9928  	if sspgr.Location != nil {
  9929  		objectMap["location"] = sspgr.Location
  9930  	}
  9931  	if sspgr.Tags != nil {
  9932  		objectMap["tags"] = sspgr.Tags
  9933  	}
  9934  	return json.Marshal(objectMap)
  9935  }
  9936  
  9937  // UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureGetResults struct.
  9938  func (sspgr *SQLStoredProcedureGetResults) UnmarshalJSON(body []byte) error {
  9939  	var m map[string]*json.RawMessage
  9940  	err := json.Unmarshal(body, &m)
  9941  	if err != nil {
  9942  		return err
  9943  	}
  9944  	for k, v := range m {
  9945  		switch k {
  9946  		case "properties":
  9947  			if v != nil {
  9948  				var SQLStoredProcedureGetProperties SQLStoredProcedureGetProperties
  9949  				err = json.Unmarshal(*v, &SQLStoredProcedureGetProperties)
  9950  				if err != nil {
  9951  					return err
  9952  				}
  9953  				sspgr.SQLStoredProcedureGetProperties = &SQLStoredProcedureGetProperties
  9954  			}
  9955  		case "id":
  9956  			if v != nil {
  9957  				var ID string
  9958  				err = json.Unmarshal(*v, &ID)
  9959  				if err != nil {
  9960  					return err
  9961  				}
  9962  				sspgr.ID = &ID
  9963  			}
  9964  		case "name":
  9965  			if v != nil {
  9966  				var name string
  9967  				err = json.Unmarshal(*v, &name)
  9968  				if err != nil {
  9969  					return err
  9970  				}
  9971  				sspgr.Name = &name
  9972  			}
  9973  		case "type":
  9974  			if v != nil {
  9975  				var typeVar string
  9976  				err = json.Unmarshal(*v, &typeVar)
  9977  				if err != nil {
  9978  					return err
  9979  				}
  9980  				sspgr.Type = &typeVar
  9981  			}
  9982  		case "location":
  9983  			if v != nil {
  9984  				var location string
  9985  				err = json.Unmarshal(*v, &location)
  9986  				if err != nil {
  9987  					return err
  9988  				}
  9989  				sspgr.Location = &location
  9990  			}
  9991  		case "tags":
  9992  			if v != nil {
  9993  				var tags map[string]*string
  9994  				err = json.Unmarshal(*v, &tags)
  9995  				if err != nil {
  9996  					return err
  9997  				}
  9998  				sspgr.Tags = tags
  9999  			}
 10000  		}
 10001  	}
 10002  
 10003  	return nil
 10004  }
 10005  
 10006  // SQLStoredProcedureListResult the List operation response, that contains the storedProcedures and their
 10007  // properties.
 10008  type SQLStoredProcedureListResult struct {
 10009  	autorest.Response `json:"-"`
 10010  	// Value - READ-ONLY; List of storedProcedures and their properties.
 10011  	Value *[]SQLStoredProcedureGetResults `json:"value,omitempty"`
 10012  }
 10013  
 10014  // MarshalJSON is the custom marshaler for SQLStoredProcedureListResult.
 10015  func (ssplr SQLStoredProcedureListResult) MarshalJSON() ([]byte, error) {
 10016  	objectMap := make(map[string]interface{})
 10017  	return json.Marshal(objectMap)
 10018  }
 10019  
 10020  // SQLStoredProcedureResource cosmos DB SQL storedProcedure resource object
 10021  type SQLStoredProcedureResource struct {
 10022  	// ID - Name of the Cosmos DB SQL storedProcedure
 10023  	ID *string `json:"id,omitempty"`
 10024  	// Body - Body of the Stored Procedure
 10025  	Body *string `json:"body,omitempty"`
 10026  }
 10027  
 10028  // SQLTriggerCreateUpdateParameters parameters to create and update Cosmos DB trigger.
 10029  type SQLTriggerCreateUpdateParameters struct {
 10030  	// SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger.
 10031  	*SQLTriggerCreateUpdateProperties `json:"properties,omitempty"`
 10032  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10033  	ID *string `json:"id,omitempty"`
 10034  	// Name - READ-ONLY; The name of the ARM resource.
 10035  	Name *string `json:"name,omitempty"`
 10036  	// Type - READ-ONLY; The type of Azure resource.
 10037  	Type *string `json:"type,omitempty"`
 10038  	// Location - The location of the resource group to which the resource belongs.
 10039  	Location *string            `json:"location,omitempty"`
 10040  	Tags     map[string]*string `json:"tags"`
 10041  }
 10042  
 10043  // MarshalJSON is the custom marshaler for SQLTriggerCreateUpdateParameters.
 10044  func (stcup SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 10045  	objectMap := make(map[string]interface{})
 10046  	if stcup.SQLTriggerCreateUpdateProperties != nil {
 10047  		objectMap["properties"] = stcup.SQLTriggerCreateUpdateProperties
 10048  	}
 10049  	if stcup.Location != nil {
 10050  		objectMap["location"] = stcup.Location
 10051  	}
 10052  	if stcup.Tags != nil {
 10053  		objectMap["tags"] = stcup.Tags
 10054  	}
 10055  	return json.Marshal(objectMap)
 10056  }
 10057  
 10058  // UnmarshalJSON is the custom unmarshaler for SQLTriggerCreateUpdateParameters struct.
 10059  func (stcup *SQLTriggerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 10060  	var m map[string]*json.RawMessage
 10061  	err := json.Unmarshal(body, &m)
 10062  	if err != nil {
 10063  		return err
 10064  	}
 10065  	for k, v := range m {
 10066  		switch k {
 10067  		case "properties":
 10068  			if v != nil {
 10069  				var SQLTriggerCreateUpdateProperties SQLTriggerCreateUpdateProperties
 10070  				err = json.Unmarshal(*v, &SQLTriggerCreateUpdateProperties)
 10071  				if err != nil {
 10072  					return err
 10073  				}
 10074  				stcup.SQLTriggerCreateUpdateProperties = &SQLTriggerCreateUpdateProperties
 10075  			}
 10076  		case "id":
 10077  			if v != nil {
 10078  				var ID string
 10079  				err = json.Unmarshal(*v, &ID)
 10080  				if err != nil {
 10081  					return err
 10082  				}
 10083  				stcup.ID = &ID
 10084  			}
 10085  		case "name":
 10086  			if v != nil {
 10087  				var name string
 10088  				err = json.Unmarshal(*v, &name)
 10089  				if err != nil {
 10090  					return err
 10091  				}
 10092  				stcup.Name = &name
 10093  			}
 10094  		case "type":
 10095  			if v != nil {
 10096  				var typeVar string
 10097  				err = json.Unmarshal(*v, &typeVar)
 10098  				if err != nil {
 10099  					return err
 10100  				}
 10101  				stcup.Type = &typeVar
 10102  			}
 10103  		case "location":
 10104  			if v != nil {
 10105  				var location string
 10106  				err = json.Unmarshal(*v, &location)
 10107  				if err != nil {
 10108  					return err
 10109  				}
 10110  				stcup.Location = &location
 10111  			}
 10112  		case "tags":
 10113  			if v != nil {
 10114  				var tags map[string]*string
 10115  				err = json.Unmarshal(*v, &tags)
 10116  				if err != nil {
 10117  					return err
 10118  				}
 10119  				stcup.Tags = tags
 10120  			}
 10121  		}
 10122  	}
 10123  
 10124  	return nil
 10125  }
 10126  
 10127  // SQLTriggerCreateUpdateProperties properties to create and update Azure Cosmos DB trigger.
 10128  type SQLTriggerCreateUpdateProperties struct {
 10129  	// Resource - The standard JSON format of a trigger
 10130  	Resource *SQLTriggerResource `json:"resource,omitempty"`
 10131  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 10132  	Options *CreateUpdateOptions `json:"options,omitempty"`
 10133  }
 10134  
 10135  // SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger
 10136  type SQLTriggerGetProperties struct {
 10137  	Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"`
 10138  }
 10139  
 10140  // SQLTriggerGetPropertiesResource ...
 10141  type SQLTriggerGetPropertiesResource struct {
 10142  	// ID - Name of the Cosmos DB SQL trigger
 10143  	ID *string `json:"id,omitempty"`
 10144  	// Body - Body of the Trigger
 10145  	Body *string `json:"body,omitempty"`
 10146  	// TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost'
 10147  	TriggerType TriggerType `json:"triggerType,omitempty"`
 10148  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 10149  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 10150  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 10151  	Rid *string `json:"_rid,omitempty"`
 10152  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 10153  	Ts *float64 `json:"_ts,omitempty"`
 10154  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 10155  	Etag *string `json:"_etag,omitempty"`
 10156  }
 10157  
 10158  // MarshalJSON is the custom marshaler for SQLTriggerGetPropertiesResource.
 10159  func (stgp SQLTriggerGetPropertiesResource) MarshalJSON() ([]byte, error) {
 10160  	objectMap := make(map[string]interface{})
 10161  	if stgp.ID != nil {
 10162  		objectMap["id"] = stgp.ID
 10163  	}
 10164  	if stgp.Body != nil {
 10165  		objectMap["body"] = stgp.Body
 10166  	}
 10167  	if stgp.TriggerType != "" {
 10168  		objectMap["triggerType"] = stgp.TriggerType
 10169  	}
 10170  	if stgp.TriggerOperation != "" {
 10171  		objectMap["triggerOperation"] = stgp.TriggerOperation
 10172  	}
 10173  	return json.Marshal(objectMap)
 10174  }
 10175  
 10176  // SQLTriggerGetResults an Azure Cosmos DB trigger.
 10177  type SQLTriggerGetResults struct {
 10178  	autorest.Response `json:"-"`
 10179  	// SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger
 10180  	*SQLTriggerGetProperties `json:"properties,omitempty"`
 10181  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10182  	ID *string `json:"id,omitempty"`
 10183  	// Name - READ-ONLY; The name of the ARM resource.
 10184  	Name *string `json:"name,omitempty"`
 10185  	// Type - READ-ONLY; The type of Azure resource.
 10186  	Type *string `json:"type,omitempty"`
 10187  	// Location - The location of the resource group to which the resource belongs.
 10188  	Location *string            `json:"location,omitempty"`
 10189  	Tags     map[string]*string `json:"tags"`
 10190  }
 10191  
 10192  // MarshalJSON is the custom marshaler for SQLTriggerGetResults.
 10193  func (stgr SQLTriggerGetResults) MarshalJSON() ([]byte, error) {
 10194  	objectMap := make(map[string]interface{})
 10195  	if stgr.SQLTriggerGetProperties != nil {
 10196  		objectMap["properties"] = stgr.SQLTriggerGetProperties
 10197  	}
 10198  	if stgr.Location != nil {
 10199  		objectMap["location"] = stgr.Location
 10200  	}
 10201  	if stgr.Tags != nil {
 10202  		objectMap["tags"] = stgr.Tags
 10203  	}
 10204  	return json.Marshal(objectMap)
 10205  }
 10206  
 10207  // UnmarshalJSON is the custom unmarshaler for SQLTriggerGetResults struct.
 10208  func (stgr *SQLTriggerGetResults) UnmarshalJSON(body []byte) error {
 10209  	var m map[string]*json.RawMessage
 10210  	err := json.Unmarshal(body, &m)
 10211  	if err != nil {
 10212  		return err
 10213  	}
 10214  	for k, v := range m {
 10215  		switch k {
 10216  		case "properties":
 10217  			if v != nil {
 10218  				var SQLTriggerGetProperties SQLTriggerGetProperties
 10219  				err = json.Unmarshal(*v, &SQLTriggerGetProperties)
 10220  				if err != nil {
 10221  					return err
 10222  				}
 10223  				stgr.SQLTriggerGetProperties = &SQLTriggerGetProperties
 10224  			}
 10225  		case "id":
 10226  			if v != nil {
 10227  				var ID string
 10228  				err = json.Unmarshal(*v, &ID)
 10229  				if err != nil {
 10230  					return err
 10231  				}
 10232  				stgr.ID = &ID
 10233  			}
 10234  		case "name":
 10235  			if v != nil {
 10236  				var name string
 10237  				err = json.Unmarshal(*v, &name)
 10238  				if err != nil {
 10239  					return err
 10240  				}
 10241  				stgr.Name = &name
 10242  			}
 10243  		case "type":
 10244  			if v != nil {
 10245  				var typeVar string
 10246  				err = json.Unmarshal(*v, &typeVar)
 10247  				if err != nil {
 10248  					return err
 10249  				}
 10250  				stgr.Type = &typeVar
 10251  			}
 10252  		case "location":
 10253  			if v != nil {
 10254  				var location string
 10255  				err = json.Unmarshal(*v, &location)
 10256  				if err != nil {
 10257  					return err
 10258  				}
 10259  				stgr.Location = &location
 10260  			}
 10261  		case "tags":
 10262  			if v != nil {
 10263  				var tags map[string]*string
 10264  				err = json.Unmarshal(*v, &tags)
 10265  				if err != nil {
 10266  					return err
 10267  				}
 10268  				stgr.Tags = tags
 10269  			}
 10270  		}
 10271  	}
 10272  
 10273  	return nil
 10274  }
 10275  
 10276  // SQLTriggerListResult the List operation response, that contains the triggers and their properties.
 10277  type SQLTriggerListResult struct {
 10278  	autorest.Response `json:"-"`
 10279  	// Value - READ-ONLY; List of triggers and their properties.
 10280  	Value *[]SQLTriggerGetResults `json:"value,omitempty"`
 10281  }
 10282  
 10283  // MarshalJSON is the custom marshaler for SQLTriggerListResult.
 10284  func (stlr SQLTriggerListResult) MarshalJSON() ([]byte, error) {
 10285  	objectMap := make(map[string]interface{})
 10286  	return json.Marshal(objectMap)
 10287  }
 10288  
 10289  // SQLTriggerResource cosmos DB SQL trigger resource object
 10290  type SQLTriggerResource struct {
 10291  	// ID - Name of the Cosmos DB SQL trigger
 10292  	ID *string `json:"id,omitempty"`
 10293  	// Body - Body of the Trigger
 10294  	Body *string `json:"body,omitempty"`
 10295  	// TriggerType - Type of the Trigger. Possible values include: 'TriggerTypePre', 'TriggerTypePost'
 10296  	TriggerType TriggerType `json:"triggerType,omitempty"`
 10297  	// TriggerOperation - The operation the trigger is associated with. Possible values include: 'TriggerOperationAll', 'TriggerOperationCreate', 'TriggerOperationUpdate', 'TriggerOperationDelete', 'TriggerOperationReplace'
 10298  	TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"`
 10299  }
 10300  
 10301  // SQLUserDefinedFunctionCreateUpdateParameters parameters to create and update Cosmos DB
 10302  // userDefinedFunction.
 10303  type SQLUserDefinedFunctionCreateUpdateParameters struct {
 10304  	// SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction.
 10305  	*SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"`
 10306  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10307  	ID *string `json:"id,omitempty"`
 10308  	// Name - READ-ONLY; The name of the ARM resource.
 10309  	Name *string `json:"name,omitempty"`
 10310  	// Type - READ-ONLY; The type of Azure resource.
 10311  	Type *string `json:"type,omitempty"`
 10312  	// Location - The location of the resource group to which the resource belongs.
 10313  	Location *string            `json:"location,omitempty"`
 10314  	Tags     map[string]*string `json:"tags"`
 10315  }
 10316  
 10317  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionCreateUpdateParameters.
 10318  func (sudfcup SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 10319  	objectMap := make(map[string]interface{})
 10320  	if sudfcup.SQLUserDefinedFunctionCreateUpdateProperties != nil {
 10321  		objectMap["properties"] = sudfcup.SQLUserDefinedFunctionCreateUpdateProperties
 10322  	}
 10323  	if sudfcup.Location != nil {
 10324  		objectMap["location"] = sudfcup.Location
 10325  	}
 10326  	if sudfcup.Tags != nil {
 10327  		objectMap["tags"] = sudfcup.Tags
 10328  	}
 10329  	return json.Marshal(objectMap)
 10330  }
 10331  
 10332  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionCreateUpdateParameters struct.
 10333  func (sudfcup *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 10334  	var m map[string]*json.RawMessage
 10335  	err := json.Unmarshal(body, &m)
 10336  	if err != nil {
 10337  		return err
 10338  	}
 10339  	for k, v := range m {
 10340  		switch k {
 10341  		case "properties":
 10342  			if v != nil {
 10343  				var SQLUserDefinedFunctionCreateUpdateProperties SQLUserDefinedFunctionCreateUpdateProperties
 10344  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionCreateUpdateProperties)
 10345  				if err != nil {
 10346  					return err
 10347  				}
 10348  				sudfcup.SQLUserDefinedFunctionCreateUpdateProperties = &SQLUserDefinedFunctionCreateUpdateProperties
 10349  			}
 10350  		case "id":
 10351  			if v != nil {
 10352  				var ID string
 10353  				err = json.Unmarshal(*v, &ID)
 10354  				if err != nil {
 10355  					return err
 10356  				}
 10357  				sudfcup.ID = &ID
 10358  			}
 10359  		case "name":
 10360  			if v != nil {
 10361  				var name string
 10362  				err = json.Unmarshal(*v, &name)
 10363  				if err != nil {
 10364  					return err
 10365  				}
 10366  				sudfcup.Name = &name
 10367  			}
 10368  		case "type":
 10369  			if v != nil {
 10370  				var typeVar string
 10371  				err = json.Unmarshal(*v, &typeVar)
 10372  				if err != nil {
 10373  					return err
 10374  				}
 10375  				sudfcup.Type = &typeVar
 10376  			}
 10377  		case "location":
 10378  			if v != nil {
 10379  				var location string
 10380  				err = json.Unmarshal(*v, &location)
 10381  				if err != nil {
 10382  					return err
 10383  				}
 10384  				sudfcup.Location = &location
 10385  			}
 10386  		case "tags":
 10387  			if v != nil {
 10388  				var tags map[string]*string
 10389  				err = json.Unmarshal(*v, &tags)
 10390  				if err != nil {
 10391  					return err
 10392  				}
 10393  				sudfcup.Tags = tags
 10394  			}
 10395  		}
 10396  	}
 10397  
 10398  	return nil
 10399  }
 10400  
 10401  // SQLUserDefinedFunctionCreateUpdateProperties properties to create and update Azure Cosmos DB
 10402  // userDefinedFunction.
 10403  type SQLUserDefinedFunctionCreateUpdateProperties struct {
 10404  	// Resource - The standard JSON format of a userDefinedFunction
 10405  	Resource *SQLUserDefinedFunctionResource `json:"resource,omitempty"`
 10406  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 10407  	Options *CreateUpdateOptions `json:"options,omitempty"`
 10408  }
 10409  
 10410  // SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction
 10411  type SQLUserDefinedFunctionGetProperties struct {
 10412  	Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"`
 10413  }
 10414  
 10415  // SQLUserDefinedFunctionGetPropertiesResource ...
 10416  type SQLUserDefinedFunctionGetPropertiesResource struct {
 10417  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 10418  	ID *string `json:"id,omitempty"`
 10419  	// Body - Body of the User Defined Function
 10420  	Body *string `json:"body,omitempty"`
 10421  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 10422  	Rid *string `json:"_rid,omitempty"`
 10423  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 10424  	Ts *float64 `json:"_ts,omitempty"`
 10425  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 10426  	Etag *string `json:"_etag,omitempty"`
 10427  }
 10428  
 10429  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetPropertiesResource.
 10430  func (sudfgp SQLUserDefinedFunctionGetPropertiesResource) MarshalJSON() ([]byte, error) {
 10431  	objectMap := make(map[string]interface{})
 10432  	if sudfgp.ID != nil {
 10433  		objectMap["id"] = sudfgp.ID
 10434  	}
 10435  	if sudfgp.Body != nil {
 10436  		objectMap["body"] = sudfgp.Body
 10437  	}
 10438  	return json.Marshal(objectMap)
 10439  }
 10440  
 10441  // SQLUserDefinedFunctionGetResults an Azure Cosmos DB userDefinedFunction.
 10442  type SQLUserDefinedFunctionGetResults struct {
 10443  	autorest.Response `json:"-"`
 10444  	// SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction
 10445  	*SQLUserDefinedFunctionGetProperties `json:"properties,omitempty"`
 10446  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10447  	ID *string `json:"id,omitempty"`
 10448  	// Name - READ-ONLY; The name of the ARM resource.
 10449  	Name *string `json:"name,omitempty"`
 10450  	// Type - READ-ONLY; The type of Azure resource.
 10451  	Type *string `json:"type,omitempty"`
 10452  	// Location - The location of the resource group to which the resource belongs.
 10453  	Location *string            `json:"location,omitempty"`
 10454  	Tags     map[string]*string `json:"tags"`
 10455  }
 10456  
 10457  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetResults.
 10458  func (sudfgr SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error) {
 10459  	objectMap := make(map[string]interface{})
 10460  	if sudfgr.SQLUserDefinedFunctionGetProperties != nil {
 10461  		objectMap["properties"] = sudfgr.SQLUserDefinedFunctionGetProperties
 10462  	}
 10463  	if sudfgr.Location != nil {
 10464  		objectMap["location"] = sudfgr.Location
 10465  	}
 10466  	if sudfgr.Tags != nil {
 10467  		objectMap["tags"] = sudfgr.Tags
 10468  	}
 10469  	return json.Marshal(objectMap)
 10470  }
 10471  
 10472  // UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionGetResults struct.
 10473  func (sudfgr *SQLUserDefinedFunctionGetResults) UnmarshalJSON(body []byte) error {
 10474  	var m map[string]*json.RawMessage
 10475  	err := json.Unmarshal(body, &m)
 10476  	if err != nil {
 10477  		return err
 10478  	}
 10479  	for k, v := range m {
 10480  		switch k {
 10481  		case "properties":
 10482  			if v != nil {
 10483  				var SQLUserDefinedFunctionGetProperties SQLUserDefinedFunctionGetProperties
 10484  				err = json.Unmarshal(*v, &SQLUserDefinedFunctionGetProperties)
 10485  				if err != nil {
 10486  					return err
 10487  				}
 10488  				sudfgr.SQLUserDefinedFunctionGetProperties = &SQLUserDefinedFunctionGetProperties
 10489  			}
 10490  		case "id":
 10491  			if v != nil {
 10492  				var ID string
 10493  				err = json.Unmarshal(*v, &ID)
 10494  				if err != nil {
 10495  					return err
 10496  				}
 10497  				sudfgr.ID = &ID
 10498  			}
 10499  		case "name":
 10500  			if v != nil {
 10501  				var name string
 10502  				err = json.Unmarshal(*v, &name)
 10503  				if err != nil {
 10504  					return err
 10505  				}
 10506  				sudfgr.Name = &name
 10507  			}
 10508  		case "type":
 10509  			if v != nil {
 10510  				var typeVar string
 10511  				err = json.Unmarshal(*v, &typeVar)
 10512  				if err != nil {
 10513  					return err
 10514  				}
 10515  				sudfgr.Type = &typeVar
 10516  			}
 10517  		case "location":
 10518  			if v != nil {
 10519  				var location string
 10520  				err = json.Unmarshal(*v, &location)
 10521  				if err != nil {
 10522  					return err
 10523  				}
 10524  				sudfgr.Location = &location
 10525  			}
 10526  		case "tags":
 10527  			if v != nil {
 10528  				var tags map[string]*string
 10529  				err = json.Unmarshal(*v, &tags)
 10530  				if err != nil {
 10531  					return err
 10532  				}
 10533  				sudfgr.Tags = tags
 10534  			}
 10535  		}
 10536  	}
 10537  
 10538  	return nil
 10539  }
 10540  
 10541  // SQLUserDefinedFunctionListResult the List operation response, that contains the userDefinedFunctions and
 10542  // their properties.
 10543  type SQLUserDefinedFunctionListResult struct {
 10544  	autorest.Response `json:"-"`
 10545  	// Value - READ-ONLY; List of userDefinedFunctions and their properties.
 10546  	Value *[]SQLUserDefinedFunctionGetResults `json:"value,omitempty"`
 10547  }
 10548  
 10549  // MarshalJSON is the custom marshaler for SQLUserDefinedFunctionListResult.
 10550  func (sudflr SQLUserDefinedFunctionListResult) MarshalJSON() ([]byte, error) {
 10551  	objectMap := make(map[string]interface{})
 10552  	return json.Marshal(objectMap)
 10553  }
 10554  
 10555  // SQLUserDefinedFunctionResource cosmos DB SQL userDefinedFunction resource object
 10556  type SQLUserDefinedFunctionResource struct {
 10557  	// ID - Name of the Cosmos DB SQL userDefinedFunction
 10558  	ID *string `json:"id,omitempty"`
 10559  	// Body - Body of the User Defined Function
 10560  	Body *string `json:"body,omitempty"`
 10561  }
 10562  
 10563  // SystemData metadata pertaining to creation and last modification of the resource.
 10564  type SystemData struct {
 10565  	// CreatedBy - The identity that created the resource.
 10566  	CreatedBy *string `json:"createdBy,omitempty"`
 10567  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
 10568  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
 10569  	// CreatedAt - The timestamp of resource creation (UTC).
 10570  	CreatedAt *date.Time `json:"createdAt,omitempty"`
 10571  	// LastModifiedBy - The identity that last modified the resource.
 10572  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
 10573  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
 10574  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
 10575  	// LastModifiedAt - The timestamp of resource last modification (UTC)
 10576  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
 10577  }
 10578  
 10579  // TableCreateUpdateParameters parameters to create and update Cosmos DB Table.
 10580  type TableCreateUpdateParameters struct {
 10581  	// TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
 10582  	*TableCreateUpdateProperties `json:"properties,omitempty"`
 10583  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10584  	ID *string `json:"id,omitempty"`
 10585  	// Name - READ-ONLY; The name of the ARM resource.
 10586  	Name *string `json:"name,omitempty"`
 10587  	// Type - READ-ONLY; The type of Azure resource.
 10588  	Type *string `json:"type,omitempty"`
 10589  	// Location - The location of the resource group to which the resource belongs.
 10590  	Location *string            `json:"location,omitempty"`
 10591  	Tags     map[string]*string `json:"tags"`
 10592  }
 10593  
 10594  // MarshalJSON is the custom marshaler for TableCreateUpdateParameters.
 10595  func (tcup TableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
 10596  	objectMap := make(map[string]interface{})
 10597  	if tcup.TableCreateUpdateProperties != nil {
 10598  		objectMap["properties"] = tcup.TableCreateUpdateProperties
 10599  	}
 10600  	if tcup.Location != nil {
 10601  		objectMap["location"] = tcup.Location
 10602  	}
 10603  	if tcup.Tags != nil {
 10604  		objectMap["tags"] = tcup.Tags
 10605  	}
 10606  	return json.Marshal(objectMap)
 10607  }
 10608  
 10609  // UnmarshalJSON is the custom unmarshaler for TableCreateUpdateParameters struct.
 10610  func (tcup *TableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
 10611  	var m map[string]*json.RawMessage
 10612  	err := json.Unmarshal(body, &m)
 10613  	if err != nil {
 10614  		return err
 10615  	}
 10616  	for k, v := range m {
 10617  		switch k {
 10618  		case "properties":
 10619  			if v != nil {
 10620  				var tableCreateUpdateProperties TableCreateUpdateProperties
 10621  				err = json.Unmarshal(*v, &tableCreateUpdateProperties)
 10622  				if err != nil {
 10623  					return err
 10624  				}
 10625  				tcup.TableCreateUpdateProperties = &tableCreateUpdateProperties
 10626  			}
 10627  		case "id":
 10628  			if v != nil {
 10629  				var ID string
 10630  				err = json.Unmarshal(*v, &ID)
 10631  				if err != nil {
 10632  					return err
 10633  				}
 10634  				tcup.ID = &ID
 10635  			}
 10636  		case "name":
 10637  			if v != nil {
 10638  				var name string
 10639  				err = json.Unmarshal(*v, &name)
 10640  				if err != nil {
 10641  					return err
 10642  				}
 10643  				tcup.Name = &name
 10644  			}
 10645  		case "type":
 10646  			if v != nil {
 10647  				var typeVar string
 10648  				err = json.Unmarshal(*v, &typeVar)
 10649  				if err != nil {
 10650  					return err
 10651  				}
 10652  				tcup.Type = &typeVar
 10653  			}
 10654  		case "location":
 10655  			if v != nil {
 10656  				var location string
 10657  				err = json.Unmarshal(*v, &location)
 10658  				if err != nil {
 10659  					return err
 10660  				}
 10661  				tcup.Location = &location
 10662  			}
 10663  		case "tags":
 10664  			if v != nil {
 10665  				var tags map[string]*string
 10666  				err = json.Unmarshal(*v, &tags)
 10667  				if err != nil {
 10668  					return err
 10669  				}
 10670  				tcup.Tags = tags
 10671  			}
 10672  		}
 10673  	}
 10674  
 10675  	return nil
 10676  }
 10677  
 10678  // TableCreateUpdateProperties properties to create and update Azure Cosmos DB Table.
 10679  type TableCreateUpdateProperties struct {
 10680  	// Resource - The standard JSON format of a Table
 10681  	Resource *TableResource `json:"resource,omitempty"`
 10682  	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
 10683  	Options *CreateUpdateOptions `json:"options,omitempty"`
 10684  }
 10685  
 10686  // TableGetProperties the properties of an Azure Cosmos Table
 10687  type TableGetProperties struct {
 10688  	Resource *TableGetPropertiesResource `json:"resource,omitempty"`
 10689  	Options  *TableGetPropertiesOptions  `json:"options,omitempty"`
 10690  }
 10691  
 10692  // TableGetPropertiesOptions ...
 10693  type TableGetPropertiesOptions struct {
 10694  	// Throughput - Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
 10695  	Throughput *int32 `json:"throughput,omitempty"`
 10696  	// AutoscaleSettings - Specifies the Autoscale settings.
 10697  	AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"`
 10698  }
 10699  
 10700  // TableGetPropertiesResource ...
 10701  type TableGetPropertiesResource struct {
 10702  	// ID - Name of the Cosmos DB table
 10703  	ID *string `json:"id,omitempty"`
 10704  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 10705  	Rid *string `json:"_rid,omitempty"`
 10706  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 10707  	Ts *float64 `json:"_ts,omitempty"`
 10708  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 10709  	Etag *string `json:"_etag,omitempty"`
 10710  }
 10711  
 10712  // MarshalJSON is the custom marshaler for TableGetPropertiesResource.
 10713  func (tgp TableGetPropertiesResource) MarshalJSON() ([]byte, error) {
 10714  	objectMap := make(map[string]interface{})
 10715  	if tgp.ID != nil {
 10716  		objectMap["id"] = tgp.ID
 10717  	}
 10718  	return json.Marshal(objectMap)
 10719  }
 10720  
 10721  // TableGetResults an Azure Cosmos DB Table.
 10722  type TableGetResults struct {
 10723  	autorest.Response `json:"-"`
 10724  	// TableGetProperties - The properties of an Azure Cosmos DB Table
 10725  	*TableGetProperties `json:"properties,omitempty"`
 10726  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 10727  	ID *string `json:"id,omitempty"`
 10728  	// Name - READ-ONLY; The name of the ARM resource.
 10729  	Name *string `json:"name,omitempty"`
 10730  	// Type - READ-ONLY; The type of Azure resource.
 10731  	Type *string `json:"type,omitempty"`
 10732  	// Location - The location of the resource group to which the resource belongs.
 10733  	Location *string            `json:"location,omitempty"`
 10734  	Tags     map[string]*string `json:"tags"`
 10735  }
 10736  
 10737  // MarshalJSON is the custom marshaler for TableGetResults.
 10738  func (tgr TableGetResults) MarshalJSON() ([]byte, error) {
 10739  	objectMap := make(map[string]interface{})
 10740  	if tgr.TableGetProperties != nil {
 10741  		objectMap["properties"] = tgr.TableGetProperties
 10742  	}
 10743  	if tgr.Location != nil {
 10744  		objectMap["location"] = tgr.Location
 10745  	}
 10746  	if tgr.Tags != nil {
 10747  		objectMap["tags"] = tgr.Tags
 10748  	}
 10749  	return json.Marshal(objectMap)
 10750  }
 10751  
 10752  // UnmarshalJSON is the custom unmarshaler for TableGetResults struct.
 10753  func (tgr *TableGetResults) UnmarshalJSON(body []byte) error {
 10754  	var m map[string]*json.RawMessage
 10755  	err := json.Unmarshal(body, &m)
 10756  	if err != nil {
 10757  		return err
 10758  	}
 10759  	for k, v := range m {
 10760  		switch k {
 10761  		case "properties":
 10762  			if v != nil {
 10763  				var tableGetProperties TableGetProperties
 10764  				err = json.Unmarshal(*v, &tableGetProperties)
 10765  				if err != nil {
 10766  					return err
 10767  				}
 10768  				tgr.TableGetProperties = &tableGetProperties
 10769  			}
 10770  		case "id":
 10771  			if v != nil {
 10772  				var ID string
 10773  				err = json.Unmarshal(*v, &ID)
 10774  				if err != nil {
 10775  					return err
 10776  				}
 10777  				tgr.ID = &ID
 10778  			}
 10779  		case "name":
 10780  			if v != nil {
 10781  				var name string
 10782  				err = json.Unmarshal(*v, &name)
 10783  				if err != nil {
 10784  					return err
 10785  				}
 10786  				tgr.Name = &name
 10787  			}
 10788  		case "type":
 10789  			if v != nil {
 10790  				var typeVar string
 10791  				err = json.Unmarshal(*v, &typeVar)
 10792  				if err != nil {
 10793  					return err
 10794  				}
 10795  				tgr.Type = &typeVar
 10796  			}
 10797  		case "location":
 10798  			if v != nil {
 10799  				var location string
 10800  				err = json.Unmarshal(*v, &location)
 10801  				if err != nil {
 10802  					return err
 10803  				}
 10804  				tgr.Location = &location
 10805  			}
 10806  		case "tags":
 10807  			if v != nil {
 10808  				var tags map[string]*string
 10809  				err = json.Unmarshal(*v, &tags)
 10810  				if err != nil {
 10811  					return err
 10812  				}
 10813  				tgr.Tags = tags
 10814  			}
 10815  		}
 10816  	}
 10817  
 10818  	return nil
 10819  }
 10820  
 10821  // TableListResult the List operation response, that contains the Table and their properties.
 10822  type TableListResult struct {
 10823  	autorest.Response `json:"-"`
 10824  	// Value - READ-ONLY; List of Table and their properties.
 10825  	Value *[]TableGetResults `json:"value,omitempty"`
 10826  }
 10827  
 10828  // MarshalJSON is the custom marshaler for TableListResult.
 10829  func (tlr TableListResult) MarshalJSON() ([]byte, error) {
 10830  	objectMap := make(map[string]interface{})
 10831  	return json.Marshal(objectMap)
 10832  }
 10833  
 10834  // TableResource cosmos DB table resource object
 10835  type TableResource struct {
 10836  	// ID - Name of the Cosmos DB table
 10837  	ID *string `json:"id,omitempty"`
 10838  }
 10839  
 10840  // TableResourcesCreateUpdateTableFuture an abstraction for monitoring and retrieving the results of a
 10841  // long-running operation.
 10842  type TableResourcesCreateUpdateTableFuture struct {
 10843  	azure.FutureAPI
 10844  	// Result returns the result of the asynchronous operation.
 10845  	// If the operation has not completed it will return an error.
 10846  	Result func(TableResourcesClient) (TableGetResults, error)
 10847  }
 10848  
 10849  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10850  func (future *TableResourcesCreateUpdateTableFuture) UnmarshalJSON(body []byte) error {
 10851  	var azFuture azure.Future
 10852  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10853  		return err
 10854  	}
 10855  	future.FutureAPI = &azFuture
 10856  	future.Result = future.result
 10857  	return nil
 10858  }
 10859  
 10860  // result is the default implementation for TableResourcesCreateUpdateTableFuture.Result.
 10861  func (future *TableResourcesCreateUpdateTableFuture) result(client TableResourcesClient) (tgr TableGetResults, err error) {
 10862  	var done bool
 10863  	done, err = future.DoneWithContext(context.Background(), client)
 10864  	if err != nil {
 10865  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", future.Response(), "Polling failure")
 10866  		return
 10867  	}
 10868  	if !done {
 10869  		tgr.Response.Response = future.Response()
 10870  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesCreateUpdateTableFuture")
 10871  		return
 10872  	}
 10873  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10874  	if tgr.Response.Response, err = future.GetResult(sender); err == nil && tgr.Response.Response.StatusCode != http.StatusNoContent {
 10875  		tgr, err = client.CreateUpdateTableResponder(tgr.Response.Response)
 10876  		if err != nil {
 10877  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", tgr.Response.Response, "Failure responding to request")
 10878  		}
 10879  	}
 10880  	return
 10881  }
 10882  
 10883  // TableResourcesDeleteTableFuture an abstraction for monitoring and retrieving the results of a
 10884  // long-running operation.
 10885  type TableResourcesDeleteTableFuture struct {
 10886  	azure.FutureAPI
 10887  	// Result returns the result of the asynchronous operation.
 10888  	// If the operation has not completed it will return an error.
 10889  	Result func(TableResourcesClient) (autorest.Response, error)
 10890  }
 10891  
 10892  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10893  func (future *TableResourcesDeleteTableFuture) UnmarshalJSON(body []byte) error {
 10894  	var azFuture azure.Future
 10895  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10896  		return err
 10897  	}
 10898  	future.FutureAPI = &azFuture
 10899  	future.Result = future.result
 10900  	return nil
 10901  }
 10902  
 10903  // result is the default implementation for TableResourcesDeleteTableFuture.Result.
 10904  func (future *TableResourcesDeleteTableFuture) result(client TableResourcesClient) (ar autorest.Response, err error) {
 10905  	var done bool
 10906  	done, err = future.DoneWithContext(context.Background(), client)
 10907  	if err != nil {
 10908  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesDeleteTableFuture", "Result", future.Response(), "Polling failure")
 10909  		return
 10910  	}
 10911  	if !done {
 10912  		ar.Response = future.Response()
 10913  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesDeleteTableFuture")
 10914  		return
 10915  	}
 10916  	ar.Response = future.Response()
 10917  	return
 10918  }
 10919  
 10920  // TableResourcesMigrateTableToAutoscaleFuture an abstraction for monitoring and retrieving the results of
 10921  // a long-running operation.
 10922  type TableResourcesMigrateTableToAutoscaleFuture struct {
 10923  	azure.FutureAPI
 10924  	// Result returns the result of the asynchronous operation.
 10925  	// If the operation has not completed it will return an error.
 10926  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 10927  }
 10928  
 10929  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10930  func (future *TableResourcesMigrateTableToAutoscaleFuture) UnmarshalJSON(body []byte) error {
 10931  	var azFuture azure.Future
 10932  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10933  		return err
 10934  	}
 10935  	future.FutureAPI = &azFuture
 10936  	future.Result = future.result
 10937  	return nil
 10938  }
 10939  
 10940  // result is the default implementation for TableResourcesMigrateTableToAutoscaleFuture.Result.
 10941  func (future *TableResourcesMigrateTableToAutoscaleFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10942  	var done bool
 10943  	done, err = future.DoneWithContext(context.Background(), client)
 10944  	if err != nil {
 10945  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", future.Response(), "Polling failure")
 10946  		return
 10947  	}
 10948  	if !done {
 10949  		tsgr.Response.Response = future.Response()
 10950  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToAutoscaleFuture")
 10951  		return
 10952  	}
 10953  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10954  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10955  		tsgr, err = client.MigrateTableToAutoscaleResponder(tsgr.Response.Response)
 10956  		if err != nil {
 10957  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToAutoscaleFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 10958  		}
 10959  	}
 10960  	return
 10961  }
 10962  
 10963  // TableResourcesMigrateTableToManualThroughputFuture an abstraction for monitoring and retrieving the
 10964  // results of a long-running operation.
 10965  type TableResourcesMigrateTableToManualThroughputFuture struct {
 10966  	azure.FutureAPI
 10967  	// Result returns the result of the asynchronous operation.
 10968  	// If the operation has not completed it will return an error.
 10969  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 10970  }
 10971  
 10972  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 10973  func (future *TableResourcesMigrateTableToManualThroughputFuture) UnmarshalJSON(body []byte) error {
 10974  	var azFuture azure.Future
 10975  	if err := json.Unmarshal(body, &azFuture); err != nil {
 10976  		return err
 10977  	}
 10978  	future.FutureAPI = &azFuture
 10979  	future.Result = future.result
 10980  	return nil
 10981  }
 10982  
 10983  // result is the default implementation for TableResourcesMigrateTableToManualThroughputFuture.Result.
 10984  func (future *TableResourcesMigrateTableToManualThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 10985  	var done bool
 10986  	done, err = future.DoneWithContext(context.Background(), client)
 10987  	if err != nil {
 10988  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", future.Response(), "Polling failure")
 10989  		return
 10990  	}
 10991  	if !done {
 10992  		tsgr.Response.Response = future.Response()
 10993  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesMigrateTableToManualThroughputFuture")
 10994  		return
 10995  	}
 10996  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 10997  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 10998  		tsgr, err = client.MigrateTableToManualThroughputResponder(tsgr.Response.Response)
 10999  		if err != nil {
 11000  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesMigrateTableToManualThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11001  		}
 11002  	}
 11003  	return
 11004  }
 11005  
 11006  // TableResourcesUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of a
 11007  // long-running operation.
 11008  type TableResourcesUpdateTableThroughputFuture struct {
 11009  	azure.FutureAPI
 11010  	// Result returns the result of the asynchronous operation.
 11011  	// If the operation has not completed it will return an error.
 11012  	Result func(TableResourcesClient) (ThroughputSettingsGetResults, error)
 11013  }
 11014  
 11015  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
 11016  func (future *TableResourcesUpdateTableThroughputFuture) UnmarshalJSON(body []byte) error {
 11017  	var azFuture azure.Future
 11018  	if err := json.Unmarshal(body, &azFuture); err != nil {
 11019  		return err
 11020  	}
 11021  	future.FutureAPI = &azFuture
 11022  	future.Result = future.result
 11023  	return nil
 11024  }
 11025  
 11026  // result is the default implementation for TableResourcesUpdateTableThroughputFuture.Result.
 11027  func (future *TableResourcesUpdateTableThroughputFuture) result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) {
 11028  	var done bool
 11029  	done, err = future.DoneWithContext(context.Background(), client)
 11030  	if err != nil {
 11031  		err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", future.Response(), "Polling failure")
 11032  		return
 11033  	}
 11034  	if !done {
 11035  		tsgr.Response.Response = future.Response()
 11036  		err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesUpdateTableThroughputFuture")
 11037  		return
 11038  	}
 11039  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
 11040  	if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent {
 11041  		tsgr, err = client.UpdateTableThroughputResponder(tsgr.Response.Response)
 11042  		if err != nil {
 11043  			err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request")
 11044  		}
 11045  	}
 11046  	return
 11047  }
 11048  
 11049  // ThroughputPolicyResource cosmos DB resource throughput policy
 11050  type ThroughputPolicyResource struct {
 11051  	// IsEnabled - Determines whether the ThroughputPolicy is active or not
 11052  	IsEnabled *bool `json:"isEnabled,omitempty"`
 11053  	// IncrementPercent - Represents the percentage by which throughput can increase every time throughput policy kicks in.
 11054  	IncrementPercent *int32 `json:"incrementPercent,omitempty"`
 11055  }
 11056  
 11057  // ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput
 11058  type ThroughputSettingsGetProperties struct {
 11059  	Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"`
 11060  }
 11061  
 11062  // ThroughputSettingsGetPropertiesResource ...
 11063  type ThroughputSettingsGetPropertiesResource struct {
 11064  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 11065  	Throughput *int32 `json:"throughput,omitempty"`
 11066  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 11067  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 11068  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 11069  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 11070  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 11071  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 11072  	// Rid - READ-ONLY; A system generated property. A unique identifier.
 11073  	Rid *string `json:"_rid,omitempty"`
 11074  	// Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource.
 11075  	Ts *float64 `json:"_ts,omitempty"`
 11076  	// Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control.
 11077  	Etag *string `json:"_etag,omitempty"`
 11078  }
 11079  
 11080  // MarshalJSON is the custom marshaler for ThroughputSettingsGetPropertiesResource.
 11081  func (tsgp ThroughputSettingsGetPropertiesResource) MarshalJSON() ([]byte, error) {
 11082  	objectMap := make(map[string]interface{})
 11083  	if tsgp.Throughput != nil {
 11084  		objectMap["throughput"] = tsgp.Throughput
 11085  	}
 11086  	if tsgp.AutoscaleSettings != nil {
 11087  		objectMap["autoscaleSettings"] = tsgp.AutoscaleSettings
 11088  	}
 11089  	return json.Marshal(objectMap)
 11090  }
 11091  
 11092  // ThroughputSettingsGetResults an Azure Cosmos DB resource throughput.
 11093  type ThroughputSettingsGetResults struct {
 11094  	autorest.Response `json:"-"`
 11095  	// ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput
 11096  	*ThroughputSettingsGetProperties `json:"properties,omitempty"`
 11097  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11098  	ID *string `json:"id,omitempty"`
 11099  	// Name - READ-ONLY; The name of the ARM resource.
 11100  	Name *string `json:"name,omitempty"`
 11101  	// Type - READ-ONLY; The type of Azure resource.
 11102  	Type *string `json:"type,omitempty"`
 11103  	// Location - The location of the resource group to which the resource belongs.
 11104  	Location *string            `json:"location,omitempty"`
 11105  	Tags     map[string]*string `json:"tags"`
 11106  }
 11107  
 11108  // MarshalJSON is the custom marshaler for ThroughputSettingsGetResults.
 11109  func (tsgr ThroughputSettingsGetResults) MarshalJSON() ([]byte, error) {
 11110  	objectMap := make(map[string]interface{})
 11111  	if tsgr.ThroughputSettingsGetProperties != nil {
 11112  		objectMap["properties"] = tsgr.ThroughputSettingsGetProperties
 11113  	}
 11114  	if tsgr.Location != nil {
 11115  		objectMap["location"] = tsgr.Location
 11116  	}
 11117  	if tsgr.Tags != nil {
 11118  		objectMap["tags"] = tsgr.Tags
 11119  	}
 11120  	return json.Marshal(objectMap)
 11121  }
 11122  
 11123  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsGetResults struct.
 11124  func (tsgr *ThroughputSettingsGetResults) UnmarshalJSON(body []byte) error {
 11125  	var m map[string]*json.RawMessage
 11126  	err := json.Unmarshal(body, &m)
 11127  	if err != nil {
 11128  		return err
 11129  	}
 11130  	for k, v := range m {
 11131  		switch k {
 11132  		case "properties":
 11133  			if v != nil {
 11134  				var throughputSettingsGetProperties ThroughputSettingsGetProperties
 11135  				err = json.Unmarshal(*v, &throughputSettingsGetProperties)
 11136  				if err != nil {
 11137  					return err
 11138  				}
 11139  				tsgr.ThroughputSettingsGetProperties = &throughputSettingsGetProperties
 11140  			}
 11141  		case "id":
 11142  			if v != nil {
 11143  				var ID string
 11144  				err = json.Unmarshal(*v, &ID)
 11145  				if err != nil {
 11146  					return err
 11147  				}
 11148  				tsgr.ID = &ID
 11149  			}
 11150  		case "name":
 11151  			if v != nil {
 11152  				var name string
 11153  				err = json.Unmarshal(*v, &name)
 11154  				if err != nil {
 11155  					return err
 11156  				}
 11157  				tsgr.Name = &name
 11158  			}
 11159  		case "type":
 11160  			if v != nil {
 11161  				var typeVar string
 11162  				err = json.Unmarshal(*v, &typeVar)
 11163  				if err != nil {
 11164  					return err
 11165  				}
 11166  				tsgr.Type = &typeVar
 11167  			}
 11168  		case "location":
 11169  			if v != nil {
 11170  				var location string
 11171  				err = json.Unmarshal(*v, &location)
 11172  				if err != nil {
 11173  					return err
 11174  				}
 11175  				tsgr.Location = &location
 11176  			}
 11177  		case "tags":
 11178  			if v != nil {
 11179  				var tags map[string]*string
 11180  				err = json.Unmarshal(*v, &tags)
 11181  				if err != nil {
 11182  					return err
 11183  				}
 11184  				tsgr.Tags = tags
 11185  			}
 11186  		}
 11187  	}
 11188  
 11189  	return nil
 11190  }
 11191  
 11192  // ThroughputSettingsResource cosmos DB resource throughput object. Either throughput is required or
 11193  // autoscaleSettings is required, but not both.
 11194  type ThroughputSettingsResource struct {
 11195  	// Throughput - Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.
 11196  	Throughput *int32 `json:"throughput,omitempty"`
 11197  	// AutoscaleSettings - Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both.
 11198  	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`
 11199  	// MinimumThroughput - READ-ONLY; The minimum throughput of the resource
 11200  	MinimumThroughput *string `json:"minimumThroughput,omitempty"`
 11201  	// OfferReplacePending - READ-ONLY; The throughput replace is pending
 11202  	OfferReplacePending *string `json:"offerReplacePending,omitempty"`
 11203  }
 11204  
 11205  // MarshalJSON is the custom marshaler for ThroughputSettingsResource.
 11206  func (tsr ThroughputSettingsResource) MarshalJSON() ([]byte, error) {
 11207  	objectMap := make(map[string]interface{})
 11208  	if tsr.Throughput != nil {
 11209  		objectMap["throughput"] = tsr.Throughput
 11210  	}
 11211  	if tsr.AutoscaleSettings != nil {
 11212  		objectMap["autoscaleSettings"] = tsr.AutoscaleSettings
 11213  	}
 11214  	return json.Marshal(objectMap)
 11215  }
 11216  
 11217  // ThroughputSettingsUpdateParameters parameters to update Cosmos DB resource throughput.
 11218  type ThroughputSettingsUpdateParameters struct {
 11219  	// ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
 11220  	*ThroughputSettingsUpdateProperties `json:"properties,omitempty"`
 11221  	// ID - READ-ONLY; The unique resource identifier of the ARM resource.
 11222  	ID *string `json:"id,omitempty"`
 11223  	// Name - READ-ONLY; The name of the ARM resource.
 11224  	Name *string `json:"name,omitempty"`
 11225  	// Type - READ-ONLY; The type of Azure resource.
 11226  	Type *string `json:"type,omitempty"`
 11227  	// Location - The location of the resource group to which the resource belongs.
 11228  	Location *string            `json:"location,omitempty"`
 11229  	Tags     map[string]*string `json:"tags"`
 11230  }
 11231  
 11232  // MarshalJSON is the custom marshaler for ThroughputSettingsUpdateParameters.
 11233  func (tsup ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error) {
 11234  	objectMap := make(map[string]interface{})
 11235  	if tsup.ThroughputSettingsUpdateProperties != nil {
 11236  		objectMap["properties"] = tsup.ThroughputSettingsUpdateProperties
 11237  	}
 11238  	if tsup.Location != nil {
 11239  		objectMap["location"] = tsup.Location
 11240  	}
 11241  	if tsup.Tags != nil {
 11242  		objectMap["tags"] = tsup.Tags
 11243  	}
 11244  	return json.Marshal(objectMap)
 11245  }
 11246  
 11247  // UnmarshalJSON is the custom unmarshaler for ThroughputSettingsUpdateParameters struct.
 11248  func (tsup *ThroughputSettingsUpdateParameters) UnmarshalJSON(body []byte) error {
 11249  	var m map[string]*json.RawMessage
 11250  	err := json.Unmarshal(body, &m)
 11251  	if err != nil {
 11252  		return err
 11253  	}
 11254  	for k, v := range m {
 11255  		switch k {
 11256  		case "properties":
 11257  			if v != nil {
 11258  				var throughputSettingsUpdateProperties ThroughputSettingsUpdateProperties
 11259  				err = json.Unmarshal(*v, &throughputSettingsUpdateProperties)
 11260  				if err != nil {
 11261  					return err
 11262  				}
 11263  				tsup.ThroughputSettingsUpdateProperties = &throughputSettingsUpdateProperties
 11264  			}
 11265  		case "id":
 11266  			if v != nil {
 11267  				var ID string
 11268  				err = json.Unmarshal(*v, &ID)
 11269  				if err != nil {
 11270  					return err
 11271  				}
 11272  				tsup.ID = &ID
 11273  			}
 11274  		case "name":
 11275  			if v != nil {
 11276  				var name string
 11277  				err = json.Unmarshal(*v, &name)
 11278  				if err != nil {
 11279  					return err
 11280  				}
 11281  				tsup.Name = &name
 11282  			}
 11283  		case "type":
 11284  			if v != nil {
 11285  				var typeVar string
 11286  				err = json.Unmarshal(*v, &typeVar)
 11287  				if err != nil {
 11288  					return err
 11289  				}
 11290  				tsup.Type = &typeVar
 11291  			}
 11292  		case "location":
 11293  			if v != nil {
 11294  				var location string
 11295  				err = json.Unmarshal(*v, &location)
 11296  				if err != nil {
 11297  					return err
 11298  				}
 11299  				tsup.Location = &location
 11300  			}
 11301  		case "tags":
 11302  			if v != nil {
 11303  				var tags map[string]*string
 11304  				err = json.Unmarshal(*v, &tags)
 11305  				if err != nil {
 11306  					return err
 11307  				}
 11308  				tsup.Tags = tags
 11309  			}
 11310  		}
 11311  	}
 11312  
 11313  	return nil
 11314  }
 11315  
 11316  // ThroughputSettingsUpdateProperties properties to update Azure Cosmos DB resource throughput.
 11317  type ThroughputSettingsUpdateProperties struct {
 11318  	// Resource - The standard JSON format of a resource throughput
 11319  	Resource *ThroughputSettingsResource `json:"resource,omitempty"`
 11320  }
 11321  
 11322  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
 11323  // which has 'tags' and a 'location'
 11324  type TrackedResource struct {
 11325  	// Tags - Resource tags.
 11326  	Tags map[string]*string `json:"tags"`
 11327  	// Location - The geo-location where the resource lives
 11328  	Location *string `json:"location,omitempty"`
 11329  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
 11330  	ID *string `json:"id,omitempty"`
 11331  	// Name - READ-ONLY; The name of the resource
 11332  	Name *string `json:"name,omitempty"`
 11333  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
 11334  	Type *string `json:"type,omitempty"`
 11335  }
 11336  
 11337  // MarshalJSON is the custom marshaler for TrackedResource.
 11338  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
 11339  	objectMap := make(map[string]interface{})
 11340  	if tr.Tags != nil {
 11341  		objectMap["tags"] = tr.Tags
 11342  	}
 11343  	if tr.Location != nil {
 11344  		objectMap["location"] = tr.Location
 11345  	}
 11346  	return json.Marshal(objectMap)
 11347  }
 11348  
 11349  // UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the
 11350  // Azure Cosmos DB service.
 11351  type UniqueKey struct {
 11352  	// Paths - List of paths must be unique for each document in the Azure Cosmos DB service
 11353  	Paths *[]string `json:"paths,omitempty"`
 11354  }
 11355  
 11356  // UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents
 11357  // in the collection in the Azure Cosmos DB service.
 11358  type UniqueKeyPolicy struct {
 11359  	// UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
 11360  	UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"`
 11361  }
 11362  
 11363  // Usage the usage data for a usage request.
 11364  type Usage struct {
 11365  	// Unit - The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond', 'UnitTypeMilliseconds'
 11366  	Unit UnitType `json:"unit,omitempty"`
 11367  	// Name - READ-ONLY; The name information for the metric.
 11368  	Name *MetricName `json:"name,omitempty"`
 11369  	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
 11370  	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
 11371  	// Limit - READ-ONLY; Maximum value for this metric
 11372  	Limit *int64 `json:"limit,omitempty"`
 11373  	// CurrentValue - READ-ONLY; Current value for this metric
 11374  	CurrentValue *int64 `json:"currentValue,omitempty"`
 11375  }
 11376  
 11377  // MarshalJSON is the custom marshaler for Usage.
 11378  func (u Usage) MarshalJSON() ([]byte, error) {
 11379  	objectMap := make(map[string]interface{})
 11380  	if u.Unit != "" {
 11381  		objectMap["unit"] = u.Unit
 11382  	}
 11383  	return json.Marshal(objectMap)
 11384  }
 11385  
 11386  // UsagesResult the response to a list usage request.
 11387  type UsagesResult struct {
 11388  	autorest.Response `json:"-"`
 11389  	// Value - READ-ONLY; The list of usages for the database. A usage is a point in time metric
 11390  	Value *[]Usage `json:"value,omitempty"`
 11391  }
 11392  
 11393  // MarshalJSON is the custom marshaler for UsagesResult.
 11394  func (ur UsagesResult) MarshalJSON() ([]byte, error) {
 11395  	objectMap := make(map[string]interface{})
 11396  	return json.Marshal(objectMap)
 11397  }
 11398  
 11399  // VirtualNetworkRule virtual Network ACL Rule object
 11400  type VirtualNetworkRule struct {
 11401  	// ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
 11402  	ID *string `json:"id,omitempty"`
 11403  	// IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
 11404  	IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
 11405  }
 11406  

View as plain text