...

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

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

View as plain text