...

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

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

View as plain text