1package documentdb
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"
33
34// ConflictResolutionMode enumerates the values for conflict resolution mode.
35type ConflictResolutionMode string
36
37const (
38	// Custom ...
39	Custom ConflictResolutionMode = "Custom"
40	// LastWriterWins ...
41	LastWriterWins ConflictResolutionMode = "LastWriterWins"
42)
43
44// PossibleConflictResolutionModeValues returns an array of possible values for the ConflictResolutionMode const type.
45func PossibleConflictResolutionModeValues() []ConflictResolutionMode {
46	return []ConflictResolutionMode{Custom, LastWriterWins}
47}
48
49// ConnectorOffer enumerates the values for connector offer.
50type ConnectorOffer string
51
52const (
53	// Small ...
54	Small ConnectorOffer = "Small"
55)
56
57// PossibleConnectorOfferValues returns an array of possible values for the ConnectorOffer const type.
58func PossibleConnectorOfferValues() []ConnectorOffer {
59	return []ConnectorOffer{Small}
60}
61
62// DatabaseAccountKind enumerates the values for database account kind.
63type DatabaseAccountKind string
64
65const (
66	// GlobalDocumentDB ...
67	GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB"
68	// MongoDB ...
69	MongoDB DatabaseAccountKind = "MongoDB"
70	// Parse ...
71	Parse DatabaseAccountKind = "Parse"
72)
73
74// PossibleDatabaseAccountKindValues returns an array of possible values for the DatabaseAccountKind const type.
75func PossibleDatabaseAccountKindValues() []DatabaseAccountKind {
76	return []DatabaseAccountKind{GlobalDocumentDB, MongoDB, Parse}
77}
78
79// DatabaseAccountOfferType enumerates the values for database account offer type.
80type DatabaseAccountOfferType string
81
82const (
83	// Standard ...
84	Standard DatabaseAccountOfferType = "Standard"
85)
86
87// PossibleDatabaseAccountOfferTypeValues returns an array of possible values for the DatabaseAccountOfferType const type.
88func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType {
89	return []DatabaseAccountOfferType{Standard}
90}
91
92// DataType enumerates the values for data type.
93type DataType string
94
95const (
96	// LineString ...
97	LineString DataType = "LineString"
98	// MultiPolygon ...
99	MultiPolygon DataType = "MultiPolygon"
100	// Number ...
101	Number DataType = "Number"
102	// Point ...
103	Point DataType = "Point"
104	// Polygon ...
105	Polygon DataType = "Polygon"
106	// String ...
107	String DataType = "String"
108)
109
110// PossibleDataTypeValues returns an array of possible values for the DataType const type.
111func PossibleDataTypeValues() []DataType {
112	return []DataType{LineString, MultiPolygon, Number, Point, Polygon, String}
113}
114
115// DefaultConsistencyLevel enumerates the values for default consistency level.
116type DefaultConsistencyLevel string
117
118const (
119	// BoundedStaleness ...
120	BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness"
121	// ConsistentPrefix ...
122	ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix"
123	// Eventual ...
124	Eventual DefaultConsistencyLevel = "Eventual"
125	// Session ...
126	Session DefaultConsistencyLevel = "Session"
127	// Strong ...
128	Strong DefaultConsistencyLevel = "Strong"
129)
130
131// PossibleDefaultConsistencyLevelValues returns an array of possible values for the DefaultConsistencyLevel const type.
132func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel {
133	return []DefaultConsistencyLevel{BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}
134}
135
136// IndexingMode enumerates the values for indexing mode.
137type IndexingMode string
138
139const (
140	// Consistent ...
141	Consistent IndexingMode = "Consistent"
142	// Lazy ...
143	Lazy IndexingMode = "Lazy"
144	// None ...
145	None IndexingMode = "None"
146)
147
148// PossibleIndexingModeValues returns an array of possible values for the IndexingMode const type.
149func PossibleIndexingModeValues() []IndexingMode {
150	return []IndexingMode{Consistent, Lazy, None}
151}
152
153// IndexKind enumerates the values for index kind.
154type IndexKind string
155
156const (
157	// Hash ...
158	Hash IndexKind = "Hash"
159	// Range ...
160	Range IndexKind = "Range"
161	// Spatial ...
162	Spatial IndexKind = "Spatial"
163)
164
165// PossibleIndexKindValues returns an array of possible values for the IndexKind const type.
166func PossibleIndexKindValues() []IndexKind {
167	return []IndexKind{Hash, Range, Spatial}
168}
169
170// KeyKind enumerates the values for key kind.
171type KeyKind string
172
173const (
174	// Primary ...
175	Primary KeyKind = "primary"
176	// PrimaryReadonly ...
177	PrimaryReadonly KeyKind = "primaryReadonly"
178	// Secondary ...
179	Secondary KeyKind = "secondary"
180	// SecondaryReadonly ...
181	SecondaryReadonly KeyKind = "secondaryReadonly"
182)
183
184// PossibleKeyKindValues returns an array of possible values for the KeyKind const type.
185func PossibleKeyKindValues() []KeyKind {
186	return []KeyKind{Primary, PrimaryReadonly, Secondary, SecondaryReadonly}
187}
188
189// PartitionKind enumerates the values for partition kind.
190type PartitionKind string
191
192const (
193	// PartitionKindHash ...
194	PartitionKindHash PartitionKind = "Hash"
195	// PartitionKindRange ...
196	PartitionKindRange PartitionKind = "Range"
197)
198
199// PossiblePartitionKindValues returns an array of possible values for the PartitionKind const type.
200func PossiblePartitionKindValues() []PartitionKind {
201	return []PartitionKind{PartitionKindHash, PartitionKindRange}
202}
203
204// PrimaryAggregationType enumerates the values for primary aggregation type.
205type PrimaryAggregationType string
206
207const (
208	// PrimaryAggregationTypeAverage ...
209	PrimaryAggregationTypeAverage PrimaryAggregationType = "Average"
210	// PrimaryAggregationTypeLast ...
211	PrimaryAggregationTypeLast PrimaryAggregationType = "Last"
212	// PrimaryAggregationTypeMaximum ...
213	PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum"
214	// PrimaryAggregationTypeMinimum ...
215	PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum"
216	// PrimaryAggregationTypeNone ...
217	PrimaryAggregationTypeNone PrimaryAggregationType = "None"
218	// PrimaryAggregationTypeTotal ...
219	PrimaryAggregationTypeTotal PrimaryAggregationType = "Total"
220)
221
222// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type.
223func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType {
224	return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal}
225}
226
227// UnitType enumerates the values for unit type.
228type UnitType string
229
230const (
231	// Bytes ...
232	Bytes UnitType = "Bytes"
233	// BytesPerSecond ...
234	BytesPerSecond UnitType = "BytesPerSecond"
235	// Count ...
236	Count UnitType = "Count"
237	// CountPerSecond ...
238	CountPerSecond UnitType = "CountPerSecond"
239	// Milliseconds ...
240	Milliseconds UnitType = "Milliseconds"
241	// Percent ...
242	Percent UnitType = "Percent"
243	// Seconds ...
244	Seconds UnitType = "Seconds"
245)
246
247// PossibleUnitTypeValues returns an array of possible values for the UnitType const type.
248func PossibleUnitTypeValues() []UnitType {
249	return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds}
250}
251
252// Capability cosmos DB capability object
253type Capability struct {
254	// Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin".
255	Name *string `json:"name,omitempty"`
256}
257
258// CassandraKeyspace an Azure Cosmos DB Cassandra keyspace.
259type CassandraKeyspace struct {
260	autorest.Response `json:"-"`
261	// CassandraKeyspaceProperties - The properties of an Azure Cosmos DB Cassandra keyspace
262	*CassandraKeyspaceProperties `json:"properties,omitempty"`
263	// ID - READ-ONLY; The unique resource identifier of the database account.
264	ID *string `json:"id,omitempty"`
265	// Name - READ-ONLY; The name of the database account.
266	Name *string `json:"name,omitempty"`
267	// Type - READ-ONLY; The type of Azure resource.
268	Type *string `json:"type,omitempty"`
269	// Location - The location of the resource group to which the resource belongs.
270	Location *string            `json:"location,omitempty"`
271	Tags     map[string]*string `json:"tags"`
272}
273
274// MarshalJSON is the custom marshaler for CassandraKeyspace.
275func (ck CassandraKeyspace) MarshalJSON() ([]byte, error) {
276	objectMap := make(map[string]interface{})
277	if ck.CassandraKeyspaceProperties != nil {
278		objectMap["properties"] = ck.CassandraKeyspaceProperties
279	}
280	if ck.Location != nil {
281		objectMap["location"] = ck.Location
282	}
283	if ck.Tags != nil {
284		objectMap["tags"] = ck.Tags
285	}
286	return json.Marshal(objectMap)
287}
288
289// UnmarshalJSON is the custom unmarshaler for CassandraKeyspace struct.
290func (ck *CassandraKeyspace) UnmarshalJSON(body []byte) error {
291	var m map[string]*json.RawMessage
292	err := json.Unmarshal(body, &m)
293	if err != nil {
294		return err
295	}
296	for k, v := range m {
297		switch k {
298		case "properties":
299			if v != nil {
300				var cassandraKeyspaceProperties CassandraKeyspaceProperties
301				err = json.Unmarshal(*v, &cassandraKeyspaceProperties)
302				if err != nil {
303					return err
304				}
305				ck.CassandraKeyspaceProperties = &cassandraKeyspaceProperties
306			}
307		case "id":
308			if v != nil {
309				var ID string
310				err = json.Unmarshal(*v, &ID)
311				if err != nil {
312					return err
313				}
314				ck.ID = &ID
315			}
316		case "name":
317			if v != nil {
318				var name string
319				err = json.Unmarshal(*v, &name)
320				if err != nil {
321					return err
322				}
323				ck.Name = &name
324			}
325		case "type":
326			if v != nil {
327				var typeVar string
328				err = json.Unmarshal(*v, &typeVar)
329				if err != nil {
330					return err
331				}
332				ck.Type = &typeVar
333			}
334		case "location":
335			if v != nil {
336				var location string
337				err = json.Unmarshal(*v, &location)
338				if err != nil {
339					return err
340				}
341				ck.Location = &location
342			}
343		case "tags":
344			if v != nil {
345				var tags map[string]*string
346				err = json.Unmarshal(*v, &tags)
347				if err != nil {
348					return err
349				}
350				ck.Tags = tags
351			}
352		}
353	}
354
355	return nil
356}
357
358// CassandraKeyspaceCreateUpdateParameters parameters to create and update Cosmos DB Cassandra keyspace.
359type CassandraKeyspaceCreateUpdateParameters struct {
360	// CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
361	*CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"`
362}
363
364// MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateParameters.
365func (ckcup CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) {
366	objectMap := make(map[string]interface{})
367	if ckcup.CassandraKeyspaceCreateUpdateProperties != nil {
368		objectMap["properties"] = ckcup.CassandraKeyspaceCreateUpdateProperties
369	}
370	return json.Marshal(objectMap)
371}
372
373// UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceCreateUpdateParameters struct.
374func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) error {
375	var m map[string]*json.RawMessage
376	err := json.Unmarshal(body, &m)
377	if err != nil {
378		return err
379	}
380	for k, v := range m {
381		switch k {
382		case "properties":
383			if v != nil {
384				var cassandraKeyspaceCreateUpdateProperties CassandraKeyspaceCreateUpdateProperties
385				err = json.Unmarshal(*v, &cassandraKeyspaceCreateUpdateProperties)
386				if err != nil {
387					return err
388				}
389				ckcup.CassandraKeyspaceCreateUpdateProperties = &cassandraKeyspaceCreateUpdateProperties
390			}
391		}
392	}
393
394	return nil
395}
396
397// CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra
398// keyspace.
399type CassandraKeyspaceCreateUpdateProperties struct {
400	// Resource - The standard JSON format of a Cassandra keyspace
401	Resource *CassandraKeyspaceResource `json:"resource,omitempty"`
402	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
403	Options map[string]*string `json:"options"`
404}
405
406// MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateProperties.
407func (ckcup CassandraKeyspaceCreateUpdateProperties) MarshalJSON() ([]byte, error) {
408	objectMap := make(map[string]interface{})
409	if ckcup.Resource != nil {
410		objectMap["resource"] = ckcup.Resource
411	}
412	if ckcup.Options != nil {
413		objectMap["options"] = ckcup.Options
414	}
415	return json.Marshal(objectMap)
416}
417
418// CassandraKeyspaceListResult the List operation response, that contains the Cassandra keyspaces and their
419// properties.
420type CassandraKeyspaceListResult struct {
421	autorest.Response `json:"-"`
422	// Value - READ-ONLY; List of Cassandra keyspaces and their properties.
423	Value *[]CassandraKeyspace `json:"value,omitempty"`
424}
425
426// CassandraKeyspaceProperties the properties of an Azure Cosmos DB Cassandra keyspace
427type CassandraKeyspaceProperties struct {
428	// ID - Name of the Cosmos DB Cassandra keyspace
429	ID *string `json:"id,omitempty"`
430}
431
432// CassandraKeyspaceResource cosmos DB Cassandra keyspace id object
433type CassandraKeyspaceResource struct {
434	// ID - Name of the Cosmos DB Cassandra keyspace
435	ID *string `json:"id,omitempty"`
436}
437
438// CassandraPartitionKey cosmos DB Cassandra table partition key
439type CassandraPartitionKey struct {
440	// Name - Name of the Cosmos DB Cassandra table partition key
441	Name *string `json:"name,omitempty"`
442}
443
444// CassandraSchema cosmos DB Cassandra table schema
445type CassandraSchema struct {
446	// Columns - List of Cassandra table columns.
447	Columns *[]Column `json:"columns,omitempty"`
448	// PartitionKeys - List of partition key.
449	PartitionKeys *[]CassandraPartitionKey `json:"partitionKeys,omitempty"`
450	// ClusterKeys - List of cluster key.
451	ClusterKeys *[]ClusterKey `json:"clusterKeys,omitempty"`
452}
453
454// CassandraTable an Azure Cosmos DB Cassandra table.
455type CassandraTable struct {
456	autorest.Response `json:"-"`
457	// CassandraTableProperties - The properties of an Azure Cosmos DB Cassandra table
458	*CassandraTableProperties `json:"properties,omitempty"`
459	// ID - READ-ONLY; The unique resource identifier of the database account.
460	ID *string `json:"id,omitempty"`
461	// Name - READ-ONLY; The name of the database account.
462	Name *string `json:"name,omitempty"`
463	// Type - READ-ONLY; The type of Azure resource.
464	Type *string `json:"type,omitempty"`
465	// Location - The location of the resource group to which the resource belongs.
466	Location *string            `json:"location,omitempty"`
467	Tags     map[string]*string `json:"tags"`
468}
469
470// MarshalJSON is the custom marshaler for CassandraTable.
471func (ct CassandraTable) MarshalJSON() ([]byte, error) {
472	objectMap := make(map[string]interface{})
473	if ct.CassandraTableProperties != nil {
474		objectMap["properties"] = ct.CassandraTableProperties
475	}
476	if ct.Location != nil {
477		objectMap["location"] = ct.Location
478	}
479	if ct.Tags != nil {
480		objectMap["tags"] = ct.Tags
481	}
482	return json.Marshal(objectMap)
483}
484
485// UnmarshalJSON is the custom unmarshaler for CassandraTable struct.
486func (ct *CassandraTable) UnmarshalJSON(body []byte) error {
487	var m map[string]*json.RawMessage
488	err := json.Unmarshal(body, &m)
489	if err != nil {
490		return err
491	}
492	for k, v := range m {
493		switch k {
494		case "properties":
495			if v != nil {
496				var cassandraTableProperties CassandraTableProperties
497				err = json.Unmarshal(*v, &cassandraTableProperties)
498				if err != nil {
499					return err
500				}
501				ct.CassandraTableProperties = &cassandraTableProperties
502			}
503		case "id":
504			if v != nil {
505				var ID string
506				err = json.Unmarshal(*v, &ID)
507				if err != nil {
508					return err
509				}
510				ct.ID = &ID
511			}
512		case "name":
513			if v != nil {
514				var name string
515				err = json.Unmarshal(*v, &name)
516				if err != nil {
517					return err
518				}
519				ct.Name = &name
520			}
521		case "type":
522			if v != nil {
523				var typeVar string
524				err = json.Unmarshal(*v, &typeVar)
525				if err != nil {
526					return err
527				}
528				ct.Type = &typeVar
529			}
530		case "location":
531			if v != nil {
532				var location string
533				err = json.Unmarshal(*v, &location)
534				if err != nil {
535					return err
536				}
537				ct.Location = &location
538			}
539		case "tags":
540			if v != nil {
541				var tags map[string]*string
542				err = json.Unmarshal(*v, &tags)
543				if err != nil {
544					return err
545				}
546				ct.Tags = tags
547			}
548		}
549	}
550
551	return nil
552}
553
554// CassandraTableCreateUpdateParameters parameters to create and update Cosmos DB Cassandra table.
555type CassandraTableCreateUpdateParameters struct {
556	// CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
557	*CassandraTableCreateUpdateProperties `json:"properties,omitempty"`
558}
559
560// MarshalJSON is the custom marshaler for CassandraTableCreateUpdateParameters.
561func (ctcup CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
562	objectMap := make(map[string]interface{})
563	if ctcup.CassandraTableCreateUpdateProperties != nil {
564		objectMap["properties"] = ctcup.CassandraTableCreateUpdateProperties
565	}
566	return json.Marshal(objectMap)
567}
568
569// UnmarshalJSON is the custom unmarshaler for CassandraTableCreateUpdateParameters struct.
570func (ctcup *CassandraTableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
571	var m map[string]*json.RawMessage
572	err := json.Unmarshal(body, &m)
573	if err != nil {
574		return err
575	}
576	for k, v := range m {
577		switch k {
578		case "properties":
579			if v != nil {
580				var cassandraTableCreateUpdateProperties CassandraTableCreateUpdateProperties
581				err = json.Unmarshal(*v, &cassandraTableCreateUpdateProperties)
582				if err != nil {
583					return err
584				}
585				ctcup.CassandraTableCreateUpdateProperties = &cassandraTableCreateUpdateProperties
586			}
587		}
588	}
589
590	return nil
591}
592
593// CassandraTableCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra table.
594type CassandraTableCreateUpdateProperties struct {
595	// Resource - The standard JSON format of a Cassandra table
596	Resource *CassandraTableResource `json:"resource,omitempty"`
597	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
598	Options map[string]*string `json:"options"`
599}
600
601// MarshalJSON is the custom marshaler for CassandraTableCreateUpdateProperties.
602func (ctcup CassandraTableCreateUpdateProperties) MarshalJSON() ([]byte, error) {
603	objectMap := make(map[string]interface{})
604	if ctcup.Resource != nil {
605		objectMap["resource"] = ctcup.Resource
606	}
607	if ctcup.Options != nil {
608		objectMap["options"] = ctcup.Options
609	}
610	return json.Marshal(objectMap)
611}
612
613// CassandraTableListResult the List operation response, that contains the Cassandra tables and their
614// properties.
615type CassandraTableListResult struct {
616	autorest.Response `json:"-"`
617	// Value - READ-ONLY; List of Cassandra tables and their properties.
618	Value *[]CassandraTable `json:"value,omitempty"`
619}
620
621// CassandraTableProperties the properties of an Azure Cosmos DB Cassandra table
622type CassandraTableProperties struct {
623	// ID - Name of the Cosmos DB Cassandra table
624	ID *string `json:"id,omitempty"`
625	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
626	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
627	// Schema - Schema of the Cosmos DB Cassandra table
628	Schema *CassandraSchema `json:"schema,omitempty"`
629}
630
631// CassandraTableResource cosmos DB Cassandra table id object
632type CassandraTableResource struct {
633	// ID - Name of the Cosmos DB Cassandra table
634	ID *string `json:"id,omitempty"`
635	// DefaultTTL - Time to live of the Cosmos DB Cassandra table
636	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
637	// Schema - Schema of the Cosmos DB Cassandra table
638	Schema *CassandraSchema `json:"schema,omitempty"`
639}
640
641// ClusterKey cosmos DB Cassandra table cluster key
642type ClusterKey struct {
643	// Name - Name of the Cosmos DB Cassandra table cluster key
644	Name *string `json:"name,omitempty"`
645	// OrderBy - Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc"
646	OrderBy *string `json:"orderBy,omitempty"`
647}
648
649// Column cosmos DB Cassandra table column
650type Column struct {
651	// Name - Name of the Cosmos DB Cassandra table column
652	Name *string `json:"name,omitempty"`
653	// Type - Type of the Cosmos DB Cassandra table column
654	Type *string `json:"type,omitempty"`
655}
656
657// ConflictResolutionPolicy the conflict resolution policy for the container.
658type ConflictResolutionPolicy struct {
659	// Mode - Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom'
660	Mode ConflictResolutionMode `json:"mode,omitempty"`
661	// ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode.
662	ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"`
663	// ConflictResolutionProcedure - The procedure to resolve conflicts in the case of custom mode.
664	ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"`
665}
666
667// ConsistencyPolicy the consistency policy for the Cosmos DB database account.
668type ConsistencyPolicy struct {
669	// DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix'
670	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
671	// 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'.
672	MaxStalenessPrefix *int64 `json:"maxStalenessPrefix,omitempty"`
673	// 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'.
674	MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"`
675}
676
677// ContainerPartitionKey the configuration of the partition key to be used for partitioning data into
678// multiple partitions
679type ContainerPartitionKey struct {
680	// Paths - List of paths using which data within the container can be partitioned
681	Paths *[]string `json:"paths,omitempty"`
682	// Kind - Indicates the kind of algorithm used for partitioning. Possible values include: 'PartitionKindHash', 'PartitionKindRange'
683	Kind PartitionKind `json:"kind,omitempty"`
684}
685
686// DatabaseAccount an Azure Cosmos DB database account.
687type DatabaseAccount struct {
688	autorest.Response `json:"-"`
689	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'
690	Kind                       DatabaseAccountKind `json:"kind,omitempty"`
691	*DatabaseAccountProperties `json:"properties,omitempty"`
692	// ID - READ-ONLY; The unique resource identifier of the database account.
693	ID *string `json:"id,omitempty"`
694	// Name - READ-ONLY; The name of the database account.
695	Name *string `json:"name,omitempty"`
696	// Type - READ-ONLY; The type of Azure resource.
697	Type *string `json:"type,omitempty"`
698	// Location - The location of the resource group to which the resource belongs.
699	Location *string            `json:"location,omitempty"`
700	Tags     map[string]*string `json:"tags"`
701}
702
703// MarshalJSON is the custom marshaler for DatabaseAccount.
704func (da DatabaseAccount) MarshalJSON() ([]byte, error) {
705	objectMap := make(map[string]interface{})
706	if da.Kind != "" {
707		objectMap["kind"] = da.Kind
708	}
709	if da.DatabaseAccountProperties != nil {
710		objectMap["properties"] = da.DatabaseAccountProperties
711	}
712	if da.Location != nil {
713		objectMap["location"] = da.Location
714	}
715	if da.Tags != nil {
716		objectMap["tags"] = da.Tags
717	}
718	return json.Marshal(objectMap)
719}
720
721// UnmarshalJSON is the custom unmarshaler for DatabaseAccount struct.
722func (da *DatabaseAccount) UnmarshalJSON(body []byte) error {
723	var m map[string]*json.RawMessage
724	err := json.Unmarshal(body, &m)
725	if err != nil {
726		return err
727	}
728	for k, v := range m {
729		switch k {
730		case "kind":
731			if v != nil {
732				var kind DatabaseAccountKind
733				err = json.Unmarshal(*v, &kind)
734				if err != nil {
735					return err
736				}
737				da.Kind = kind
738			}
739		case "properties":
740			if v != nil {
741				var databaseAccountProperties DatabaseAccountProperties
742				err = json.Unmarshal(*v, &databaseAccountProperties)
743				if err != nil {
744					return err
745				}
746				da.DatabaseAccountProperties = &databaseAccountProperties
747			}
748		case "id":
749			if v != nil {
750				var ID string
751				err = json.Unmarshal(*v, &ID)
752				if err != nil {
753					return err
754				}
755				da.ID = &ID
756			}
757		case "name":
758			if v != nil {
759				var name string
760				err = json.Unmarshal(*v, &name)
761				if err != nil {
762					return err
763				}
764				da.Name = &name
765			}
766		case "type":
767			if v != nil {
768				var typeVar string
769				err = json.Unmarshal(*v, &typeVar)
770				if err != nil {
771					return err
772				}
773				da.Type = &typeVar
774			}
775		case "location":
776			if v != nil {
777				var location string
778				err = json.Unmarshal(*v, &location)
779				if err != nil {
780					return err
781				}
782				da.Location = &location
783			}
784		case "tags":
785			if v != nil {
786				var tags map[string]*string
787				err = json.Unmarshal(*v, &tags)
788				if err != nil {
789					return err
790				}
791				da.Tags = tags
792			}
793		}
794	}
795
796	return nil
797}
798
799// DatabaseAccountConnectionString connection string for the Cosmos DB account
800type DatabaseAccountConnectionString struct {
801	// ConnectionString - READ-ONLY; Value of the connection string
802	ConnectionString *string `json:"connectionString,omitempty"`
803	// Description - READ-ONLY; Description of the connection string
804	Description *string `json:"description,omitempty"`
805}
806
807// DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts.
808type DatabaseAccountCreateUpdateParameters struct {
809	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'
810	Kind                                   DatabaseAccountKind `json:"kind,omitempty"`
811	*DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
812	// ID - READ-ONLY; The unique resource identifier of the database account.
813	ID *string `json:"id,omitempty"`
814	// Name - READ-ONLY; The name of the database account.
815	Name *string `json:"name,omitempty"`
816	// Type - READ-ONLY; The type of Azure resource.
817	Type *string `json:"type,omitempty"`
818	// Location - The location of the resource group to which the resource belongs.
819	Location *string            `json:"location,omitempty"`
820	Tags     map[string]*string `json:"tags"`
821}
822
823// MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateParameters.
824func (dacup DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) {
825	objectMap := make(map[string]interface{})
826	if dacup.Kind != "" {
827		objectMap["kind"] = dacup.Kind
828	}
829	if dacup.DatabaseAccountCreateUpdateProperties != nil {
830		objectMap["properties"] = dacup.DatabaseAccountCreateUpdateProperties
831	}
832	if dacup.Location != nil {
833		objectMap["location"] = dacup.Location
834	}
835	if dacup.Tags != nil {
836		objectMap["tags"] = dacup.Tags
837	}
838	return json.Marshal(objectMap)
839}
840
841// UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct.
842func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error {
843	var m map[string]*json.RawMessage
844	err := json.Unmarshal(body, &m)
845	if err != nil {
846		return err
847	}
848	for k, v := range m {
849		switch k {
850		case "kind":
851			if v != nil {
852				var kind DatabaseAccountKind
853				err = json.Unmarshal(*v, &kind)
854				if err != nil {
855					return err
856				}
857				dacup.Kind = kind
858			}
859		case "properties":
860			if v != nil {
861				var databaseAccountCreateUpdateProperties DatabaseAccountCreateUpdateProperties
862				err = json.Unmarshal(*v, &databaseAccountCreateUpdateProperties)
863				if err != nil {
864					return err
865				}
866				dacup.DatabaseAccountCreateUpdateProperties = &databaseAccountCreateUpdateProperties
867			}
868		case "id":
869			if v != nil {
870				var ID string
871				err = json.Unmarshal(*v, &ID)
872				if err != nil {
873					return err
874				}
875				dacup.ID = &ID
876			}
877		case "name":
878			if v != nil {
879				var name string
880				err = json.Unmarshal(*v, &name)
881				if err != nil {
882					return err
883				}
884				dacup.Name = &name
885			}
886		case "type":
887			if v != nil {
888				var typeVar string
889				err = json.Unmarshal(*v, &typeVar)
890				if err != nil {
891					return err
892				}
893				dacup.Type = &typeVar
894			}
895		case "location":
896			if v != nil {
897				var location string
898				err = json.Unmarshal(*v, &location)
899				if err != nil {
900					return err
901				}
902				dacup.Location = &location
903			}
904		case "tags":
905			if v != nil {
906				var tags map[string]*string
907				err = json.Unmarshal(*v, &tags)
908				if err != nil {
909					return err
910				}
911				dacup.Tags = tags
912			}
913		}
914	}
915
916	return nil
917}
918
919// DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.
920type DatabaseAccountCreateUpdateProperties struct {
921	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
922	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
923	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
924	Locations *[]Location `json:"locations,omitempty"`
925	// DatabaseAccountOfferType - The offer type for the database
926	DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"`
927	// IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
928	IPRangeFilter *string `json:"ipRangeFilter,omitempty"`
929	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
930	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
931	// 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.
932	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
933	// Capabilities - List of Cosmos DB capabilities for the account
934	Capabilities *[]Capability `json:"capabilities,omitempty"`
935	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
936	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
937	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
938	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
939	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
940	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
941	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
942	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
943}
944
945// DatabaseAccountListConnectionStringsResult the connection strings for the given database account.
946type DatabaseAccountListConnectionStringsResult struct {
947	autorest.Response `json:"-"`
948	// ConnectionStrings - An array that contains the connection strings for the Cosmos DB account.
949	ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"`
950}
951
952// DatabaseAccountListKeysResult the access keys for the given database account.
953type DatabaseAccountListKeysResult struct {
954	autorest.Response `json:"-"`
955	// PrimaryMasterKey - READ-ONLY; Base 64 encoded value of the primary read-write key.
956	PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"`
957	// SecondaryMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-write key.
958	SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty"`
959	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
960	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
961	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
962	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
963}
964
965// DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account.
966type DatabaseAccountListReadOnlyKeysResult struct {
967	autorest.Response `json:"-"`
968	// PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key.
969	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
970	// SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key.
971	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
972}
973
974// DatabaseAccountPatchParameters parameters for patching Azure Cosmos DB database account properties.
975type DatabaseAccountPatchParameters struct {
976	Tags                            map[string]*string `json:"tags"`
977	*DatabaseAccountPatchProperties `json:"properties,omitempty"`
978}
979
980// MarshalJSON is the custom marshaler for DatabaseAccountPatchParameters.
981func (dapp DatabaseAccountPatchParameters) MarshalJSON() ([]byte, error) {
982	objectMap := make(map[string]interface{})
983	if dapp.Tags != nil {
984		objectMap["tags"] = dapp.Tags
985	}
986	if dapp.DatabaseAccountPatchProperties != nil {
987		objectMap["properties"] = dapp.DatabaseAccountPatchProperties
988	}
989	return json.Marshal(objectMap)
990}
991
992// UnmarshalJSON is the custom unmarshaler for DatabaseAccountPatchParameters struct.
993func (dapp *DatabaseAccountPatchParameters) UnmarshalJSON(body []byte) error {
994	var m map[string]*json.RawMessage
995	err := json.Unmarshal(body, &m)
996	if err != nil {
997		return err
998	}
999	for k, v := range m {
1000		switch k {
1001		case "tags":
1002			if v != nil {
1003				var tags map[string]*string
1004				err = json.Unmarshal(*v, &tags)
1005				if err != nil {
1006					return err
1007				}
1008				dapp.Tags = tags
1009			}
1010		case "properties":
1011			if v != nil {
1012				var databaseAccountPatchProperties DatabaseAccountPatchProperties
1013				err = json.Unmarshal(*v, &databaseAccountPatchProperties)
1014				if err != nil {
1015					return err
1016				}
1017				dapp.DatabaseAccountPatchProperties = &databaseAccountPatchProperties
1018			}
1019		}
1020	}
1021
1022	return nil
1023}
1024
1025// DatabaseAccountPatchProperties properties to update Azure Cosmos DB database accounts.
1026type DatabaseAccountPatchProperties struct {
1027	// Capabilities - List of Cosmos DB capabilities for the account
1028	Capabilities *[]Capability `json:"capabilities,omitempty"`
1029}
1030
1031// DatabaseAccountProperties properties for the database account.
1032type DatabaseAccountProperties struct {
1033	ProvisioningState *string `json:"provisioningState,omitempty"`
1034	// DocumentEndpoint - READ-ONLY; The connection endpoint for the Cosmos DB database account.
1035	DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
1036	// DatabaseAccountOfferType - READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'Standard'
1037	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
1038	// IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
1039	IPRangeFilter *string `json:"ipRangeFilter,omitempty"`
1040	// IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules.
1041	IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
1042	// 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.
1043	EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
1044	// ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
1045	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
1046	// Capabilities - List of Cosmos DB capabilities for the account
1047	Capabilities *[]Capability `json:"capabilities,omitempty"`
1048	// WriteLocations - READ-ONLY; An array that contains the write location for the Cosmos DB account.
1049	WriteLocations *[]Location `json:"writeLocations,omitempty"`
1050	// ReadLocations - READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account.
1051	ReadLocations *[]Location `json:"readLocations,omitempty"`
1052	// FailoverPolicies - READ-ONLY; An array that contains the regions ordered by their failover priorities.
1053	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
1054	// VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account.
1055	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
1056	// EnableMultipleWriteLocations - Enables the account to write in multiple locations
1057	EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
1058	// EnableCassandraConnector - Enables the cassandra connector on the Cosmos DB C* account
1059	EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
1060	// ConnectorOffer - The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
1061	ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"`
1062}
1063
1064// DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account.
1065type DatabaseAccountRegenerateKeyParameters struct {
1066	// KeyKind - The access key to regenerate. Possible values include: 'Primary', 'Secondary', 'PrimaryReadonly', 'SecondaryReadonly'
1067	KeyKind KeyKind `json:"keyKind,omitempty"`
1068}
1069
1070// DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1071// long-running operation.
1072type DatabaseAccountsCreateOrUpdateFuture struct {
1073	azure.Future
1074}
1075
1076// Result returns the result of the asynchronous operation.
1077// If the operation has not completed it will return an error.
1078func (future *DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
1079	var done bool
1080	done, err = future.DoneWithContext(context.Background(), client)
1081	if err != nil {
1082		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1083		return
1084	}
1085	if !done {
1086		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
1087		return
1088	}
1089	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1090	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
1091		da, err = client.CreateOrUpdateResponder(da.Response.Response)
1092		if err != nil {
1093			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
1094		}
1095	}
1096	return
1097}
1098
1099// DatabaseAccountsCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the
1100// results of a long-running operation.
1101type DatabaseAccountsCreateUpdateCassandraKeyspaceFuture struct {
1102	azure.Future
1103}
1104
1105// Result returns the result of the asynchronous operation.
1106// If the operation has not completed it will return an error.
1107func (future *DatabaseAccountsCreateUpdateCassandraKeyspaceFuture) Result(client DatabaseAccountsClient) (ck CassandraKeyspace, err error) {
1108	var done bool
1109	done, err = future.DoneWithContext(context.Background(), client)
1110	if err != nil {
1111		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
1112		return
1113	}
1114	if !done {
1115		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateCassandraKeyspaceFuture")
1116		return
1117	}
1118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1119	if ck.Response.Response, err = future.GetResult(sender); err == nil && ck.Response.Response.StatusCode != http.StatusNoContent {
1120		ck, err = client.CreateUpdateCassandraKeyspaceResponder(ck.Response.Response)
1121		if err != nil {
1122			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateCassandraKeyspaceFuture", "Result", ck.Response.Response, "Failure responding to request")
1123		}
1124	}
1125	return
1126}
1127
1128// DatabaseAccountsCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the
1129// results of a long-running operation.
1130type DatabaseAccountsCreateUpdateCassandraTableFuture struct {
1131	azure.Future
1132}
1133
1134// Result returns the result of the asynchronous operation.
1135// If the operation has not completed it will return an error.
1136func (future *DatabaseAccountsCreateUpdateCassandraTableFuture) Result(client DatabaseAccountsClient) (ct CassandraTable, err error) {
1137	var done bool
1138	done, err = future.DoneWithContext(context.Background(), client)
1139	if err != nil {
1140		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateCassandraTableFuture", "Result", future.Response(), "Polling failure")
1141		return
1142	}
1143	if !done {
1144		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateCassandraTableFuture")
1145		return
1146	}
1147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1148	if ct.Response.Response, err = future.GetResult(sender); err == nil && ct.Response.Response.StatusCode != http.StatusNoContent {
1149		ct, err = client.CreateUpdateCassandraTableResponder(ct.Response.Response)
1150		if err != nil {
1151			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateCassandraTableFuture", "Result", ct.Response.Response, "Failure responding to request")
1152		}
1153	}
1154	return
1155}
1156
1157// DatabaseAccountsCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the
1158// results of a long-running operation.
1159type DatabaseAccountsCreateUpdateGremlinDatabaseFuture struct {
1160	azure.Future
1161}
1162
1163// Result returns the result of the asynchronous operation.
1164// If the operation has not completed it will return an error.
1165func (future *DatabaseAccountsCreateUpdateGremlinDatabaseFuture) Result(client DatabaseAccountsClient) (gd GremlinDatabase, err error) {
1166	var done bool
1167	done, err = future.DoneWithContext(context.Background(), client)
1168	if err != nil {
1169		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
1170		return
1171	}
1172	if !done {
1173		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateGremlinDatabaseFuture")
1174		return
1175	}
1176	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1177	if gd.Response.Response, err = future.GetResult(sender); err == nil && gd.Response.Response.StatusCode != http.StatusNoContent {
1178		gd, err = client.CreateUpdateGremlinDatabaseResponder(gd.Response.Response)
1179		if err != nil {
1180			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateGremlinDatabaseFuture", "Result", gd.Response.Response, "Failure responding to request")
1181		}
1182	}
1183	return
1184}
1185
1186// DatabaseAccountsCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results
1187// of a long-running operation.
1188type DatabaseAccountsCreateUpdateGremlinGraphFuture struct {
1189	azure.Future
1190}
1191
1192// Result returns the result of the asynchronous operation.
1193// If the operation has not completed it will return an error.
1194func (future *DatabaseAccountsCreateUpdateGremlinGraphFuture) Result(client DatabaseAccountsClient) (gg GremlinGraph, err error) {
1195	var done bool
1196	done, err = future.DoneWithContext(context.Background(), client)
1197	if err != nil {
1198		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateGremlinGraphFuture", "Result", future.Response(), "Polling failure")
1199		return
1200	}
1201	if !done {
1202		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateGremlinGraphFuture")
1203		return
1204	}
1205	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1206	if gg.Response.Response, err = future.GetResult(sender); err == nil && gg.Response.Response.StatusCode != http.StatusNoContent {
1207		gg, err = client.CreateUpdateGremlinGraphResponder(gg.Response.Response)
1208		if err != nil {
1209			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateGremlinGraphFuture", "Result", gg.Response.Response, "Failure responding to request")
1210		}
1211	}
1212	return
1213}
1214
1215// DatabaseAccountsCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the
1216// results of a long-running operation.
1217type DatabaseAccountsCreateUpdateMongoDBCollectionFuture struct {
1218	azure.Future
1219}
1220
1221// Result returns the result of the asynchronous operation.
1222// If the operation has not completed it will return an error.
1223func (future *DatabaseAccountsCreateUpdateMongoDBCollectionFuture) Result(client DatabaseAccountsClient) (mdc MongoDBCollection, err error) {
1224	var done bool
1225	done, err = future.DoneWithContext(context.Background(), client)
1226	if err != nil {
1227		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
1228		return
1229	}
1230	if !done {
1231		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateMongoDBCollectionFuture")
1232		return
1233	}
1234	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1235	if mdc.Response.Response, err = future.GetResult(sender); err == nil && mdc.Response.Response.StatusCode != http.StatusNoContent {
1236		mdc, err = client.CreateUpdateMongoDBCollectionResponder(mdc.Response.Response)
1237		if err != nil {
1238			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateMongoDBCollectionFuture", "Result", mdc.Response.Response, "Failure responding to request")
1239		}
1240	}
1241	return
1242}
1243
1244// DatabaseAccountsCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the
1245// results of a long-running operation.
1246type DatabaseAccountsCreateUpdateMongoDBDatabaseFuture struct {
1247	azure.Future
1248}
1249
1250// Result returns the result of the asynchronous operation.
1251// If the operation has not completed it will return an error.
1252func (future *DatabaseAccountsCreateUpdateMongoDBDatabaseFuture) Result(client DatabaseAccountsClient) (mdd MongoDBDatabase, err error) {
1253	var done bool
1254	done, err = future.DoneWithContext(context.Background(), client)
1255	if err != nil {
1256		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
1257		return
1258	}
1259	if !done {
1260		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateMongoDBDatabaseFuture")
1261		return
1262	}
1263	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1264	if mdd.Response.Response, err = future.GetResult(sender); err == nil && mdd.Response.Response.StatusCode != http.StatusNoContent {
1265		mdd, err = client.CreateUpdateMongoDBDatabaseResponder(mdd.Response.Response)
1266		if err != nil {
1267			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateMongoDBDatabaseFuture", "Result", mdd.Response.Response, "Failure responding to request")
1268		}
1269	}
1270	return
1271}
1272
1273// DatabaseAccountsCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results
1274// of a long-running operation.
1275type DatabaseAccountsCreateUpdateSQLContainerFuture struct {
1276	azure.Future
1277}
1278
1279// Result returns the result of the asynchronous operation.
1280// If the operation has not completed it will return an error.
1281func (future *DatabaseAccountsCreateUpdateSQLContainerFuture) Result(client DatabaseAccountsClient) (sc SQLContainer, err error) {
1282	var done bool
1283	done, err = future.DoneWithContext(context.Background(), client)
1284	if err != nil {
1285		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateSQLContainerFuture", "Result", future.Response(), "Polling failure")
1286		return
1287	}
1288	if !done {
1289		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateSQLContainerFuture")
1290		return
1291	}
1292	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1293	if sc.Response.Response, err = future.GetResult(sender); err == nil && sc.Response.Response.StatusCode != http.StatusNoContent {
1294		sc, err = client.CreateUpdateSQLContainerResponder(sc.Response.Response)
1295		if err != nil {
1296			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateSQLContainerFuture", "Result", sc.Response.Response, "Failure responding to request")
1297		}
1298	}
1299	return
1300}
1301
1302// DatabaseAccountsCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results
1303// of a long-running operation.
1304type DatabaseAccountsCreateUpdateSQLDatabaseFuture struct {
1305	azure.Future
1306}
1307
1308// Result returns the result of the asynchronous operation.
1309// If the operation has not completed it will return an error.
1310func (future *DatabaseAccountsCreateUpdateSQLDatabaseFuture) Result(client DatabaseAccountsClient) (sd SQLDatabase, err error) {
1311	var done bool
1312	done, err = future.DoneWithContext(context.Background(), client)
1313	if err != nil {
1314		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
1315		return
1316	}
1317	if !done {
1318		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateSQLDatabaseFuture")
1319		return
1320	}
1321	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1322	if sd.Response.Response, err = future.GetResult(sender); err == nil && sd.Response.Response.StatusCode != http.StatusNoContent {
1323		sd, err = client.CreateUpdateSQLDatabaseResponder(sd.Response.Response)
1324		if err != nil {
1325			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateSQLDatabaseFuture", "Result", sd.Response.Response, "Failure responding to request")
1326		}
1327	}
1328	return
1329}
1330
1331// DatabaseAccountsCreateUpdateTableFuture an abstraction for monitoring and retrieving the results of a
1332// long-running operation.
1333type DatabaseAccountsCreateUpdateTableFuture struct {
1334	azure.Future
1335}
1336
1337// Result returns the result of the asynchronous operation.
1338// If the operation has not completed it will return an error.
1339func (future *DatabaseAccountsCreateUpdateTableFuture) Result(client DatabaseAccountsClient) (t Table, err error) {
1340	var done bool
1341	done, err = future.DoneWithContext(context.Background(), client)
1342	if err != nil {
1343		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateTableFuture", "Result", future.Response(), "Polling failure")
1344		return
1345	}
1346	if !done {
1347		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateUpdateTableFuture")
1348		return
1349	}
1350	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1351	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1352		t, err = client.CreateUpdateTableResponder(t.Response.Response)
1353		if err != nil {
1354			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateUpdateTableFuture", "Result", t.Response.Response, "Failure responding to request")
1355		}
1356	}
1357	return
1358}
1359
1360// DatabaseAccountsDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results
1361// of a long-running operation.
1362type DatabaseAccountsDeleteCassandraKeyspaceFuture struct {
1363	azure.Future
1364}
1365
1366// Result returns the result of the asynchronous operation.
1367// If the operation has not completed it will return an error.
1368func (future *DatabaseAccountsDeleteCassandraKeyspaceFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1369	var done bool
1370	done, err = future.DoneWithContext(context.Background(), client)
1371	if err != nil {
1372		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure")
1373		return
1374	}
1375	if !done {
1376		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteCassandraKeyspaceFuture")
1377		return
1378	}
1379	ar.Response = future.Response()
1380	return
1381}
1382
1383// DatabaseAccountsDeleteCassandraTableFuture an abstraction for monitoring and retrieving the results of a
1384// long-running operation.
1385type DatabaseAccountsDeleteCassandraTableFuture struct {
1386	azure.Future
1387}
1388
1389// Result returns the result of the asynchronous operation.
1390// If the operation has not completed it will return an error.
1391func (future *DatabaseAccountsDeleteCassandraTableFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1392	var done bool
1393	done, err = future.DoneWithContext(context.Background(), client)
1394	if err != nil {
1395		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteCassandraTableFuture", "Result", future.Response(), "Polling failure")
1396		return
1397	}
1398	if !done {
1399		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteCassandraTableFuture")
1400		return
1401	}
1402	ar.Response = future.Response()
1403	return
1404}
1405
1406// DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1407// operation.
1408type DatabaseAccountsDeleteFuture struct {
1409	azure.Future
1410}
1411
1412// Result returns the result of the asynchronous operation.
1413// If the operation has not completed it will return an error.
1414func (future *DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1415	var done bool
1416	done, err = future.DoneWithContext(context.Background(), client)
1417	if err != nil {
1418		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Polling failure")
1419		return
1420	}
1421	if !done {
1422		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
1423		return
1424	}
1425	ar.Response = future.Response()
1426	return
1427}
1428
1429// DatabaseAccountsDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of
1430// a long-running operation.
1431type DatabaseAccountsDeleteGremlinDatabaseFuture struct {
1432	azure.Future
1433}
1434
1435// Result returns the result of the asynchronous operation.
1436// If the operation has not completed it will return an error.
1437func (future *DatabaseAccountsDeleteGremlinDatabaseFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1438	var done bool
1439	done, err = future.DoneWithContext(context.Background(), client)
1440	if err != nil {
1441		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteGremlinDatabaseFuture", "Result", future.Response(), "Polling failure")
1442		return
1443	}
1444	if !done {
1445		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteGremlinDatabaseFuture")
1446		return
1447	}
1448	ar.Response = future.Response()
1449	return
1450}
1451
1452// DatabaseAccountsDeleteGremlinGraphFuture an abstraction for monitoring and retrieving the results of a
1453// long-running operation.
1454type DatabaseAccountsDeleteGremlinGraphFuture struct {
1455	azure.Future
1456}
1457
1458// Result returns the result of the asynchronous operation.
1459// If the operation has not completed it will return an error.
1460func (future *DatabaseAccountsDeleteGremlinGraphFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1461	var done bool
1462	done, err = future.DoneWithContext(context.Background(), client)
1463	if err != nil {
1464		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteGremlinGraphFuture", "Result", future.Response(), "Polling failure")
1465		return
1466	}
1467	if !done {
1468		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteGremlinGraphFuture")
1469		return
1470	}
1471	ar.Response = future.Response()
1472	return
1473}
1474
1475// DatabaseAccountsDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results
1476// of a long-running operation.
1477type DatabaseAccountsDeleteMongoDBCollectionFuture struct {
1478	azure.Future
1479}
1480
1481// Result returns the result of the asynchronous operation.
1482// If the operation has not completed it will return an error.
1483func (future *DatabaseAccountsDeleteMongoDBCollectionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1484	var done bool
1485	done, err = future.DoneWithContext(context.Background(), client)
1486	if err != nil {
1487		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteMongoDBCollectionFuture", "Result", future.Response(), "Polling failure")
1488		return
1489	}
1490	if !done {
1491		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteMongoDBCollectionFuture")
1492		return
1493	}
1494	ar.Response = future.Response()
1495	return
1496}
1497
1498// DatabaseAccountsDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of
1499// a long-running operation.
1500type DatabaseAccountsDeleteMongoDBDatabaseFuture struct {
1501	azure.Future
1502}
1503
1504// Result returns the result of the asynchronous operation.
1505// If the operation has not completed it will return an error.
1506func (future *DatabaseAccountsDeleteMongoDBDatabaseFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1507	var done bool
1508	done, err = future.DoneWithContext(context.Background(), client)
1509	if err != nil {
1510		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure")
1511		return
1512	}
1513	if !done {
1514		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteMongoDBDatabaseFuture")
1515		return
1516	}
1517	ar.Response = future.Response()
1518	return
1519}
1520
1521// DatabaseAccountsDeleteSQLContainerFuture an abstraction for monitoring and retrieving the results of a
1522// long-running operation.
1523type DatabaseAccountsDeleteSQLContainerFuture struct {
1524	azure.Future
1525}
1526
1527// Result returns the result of the asynchronous operation.
1528// If the operation has not completed it will return an error.
1529func (future *DatabaseAccountsDeleteSQLContainerFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1530	var done bool
1531	done, err = future.DoneWithContext(context.Background(), client)
1532	if err != nil {
1533		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteSQLContainerFuture", "Result", future.Response(), "Polling failure")
1534		return
1535	}
1536	if !done {
1537		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteSQLContainerFuture")
1538		return
1539	}
1540	ar.Response = future.Response()
1541	return
1542}
1543
1544// DatabaseAccountsDeleteSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a
1545// long-running operation.
1546type DatabaseAccountsDeleteSQLDatabaseFuture struct {
1547	azure.Future
1548}
1549
1550// Result returns the result of the asynchronous operation.
1551// If the operation has not completed it will return an error.
1552func (future *DatabaseAccountsDeleteSQLDatabaseFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1553	var done bool
1554	done, err = future.DoneWithContext(context.Background(), client)
1555	if err != nil {
1556		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteSQLDatabaseFuture", "Result", future.Response(), "Polling failure")
1557		return
1558	}
1559	if !done {
1560		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteSQLDatabaseFuture")
1561		return
1562	}
1563	ar.Response = future.Response()
1564	return
1565}
1566
1567// DatabaseAccountsDeleteTableFuture an abstraction for monitoring and retrieving the results of a
1568// long-running operation.
1569type DatabaseAccountsDeleteTableFuture struct {
1570	azure.Future
1571}
1572
1573// Result returns the result of the asynchronous operation.
1574// If the operation has not completed it will return an error.
1575func (future *DatabaseAccountsDeleteTableFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1576	var done bool
1577	done, err = future.DoneWithContext(context.Background(), client)
1578	if err != nil {
1579		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteTableFuture", "Result", future.Response(), "Polling failure")
1580		return
1581	}
1582	if !done {
1583		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteTableFuture")
1584		return
1585	}
1586	ar.Response = future.Response()
1587	return
1588}
1589
1590// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of
1591// a long-running operation.
1592type DatabaseAccountsFailoverPriorityChangeFuture struct {
1593	azure.Future
1594}
1595
1596// Result returns the result of the asynchronous operation.
1597// If the operation has not completed it will return an error.
1598func (future *DatabaseAccountsFailoverPriorityChangeFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1599	var done bool
1600	done, err = future.DoneWithContext(context.Background(), client)
1601	if err != nil {
1602		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Polling failure")
1603		return
1604	}
1605	if !done {
1606		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
1607		return
1608	}
1609	ar.Response = future.Response()
1610	return
1611}
1612
1613// DatabaseAccountsListResult the List operation response, that contains the database accounts and their
1614// properties.
1615type DatabaseAccountsListResult struct {
1616	autorest.Response `json:"-"`
1617	// Value - READ-ONLY; List of database account and their properties.
1618	Value *[]DatabaseAccount `json:"value,omitempty"`
1619}
1620
1621// DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a
1622// long-running operation.
1623type DatabaseAccountsOfflineRegionFuture struct {
1624	azure.Future
1625}
1626
1627// Result returns the result of the asynchronous operation.
1628// If the operation has not completed it will return an error.
1629func (future *DatabaseAccountsOfflineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1630	var done bool
1631	done, err = future.DoneWithContext(context.Background(), client)
1632	if err != nil {
1633		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure")
1634		return
1635	}
1636	if !done {
1637		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture")
1638		return
1639	}
1640	ar.Response = future.Response()
1641	return
1642}
1643
1644// DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a
1645// long-running operation.
1646type DatabaseAccountsOnlineRegionFuture struct {
1647	azure.Future
1648}
1649
1650// Result returns the result of the asynchronous operation.
1651// If the operation has not completed it will return an error.
1652func (future *DatabaseAccountsOnlineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1653	var done bool
1654	done, err = future.DoneWithContext(context.Background(), client)
1655	if err != nil {
1656		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure")
1657		return
1658	}
1659	if !done {
1660		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture")
1661		return
1662	}
1663	ar.Response = future.Response()
1664	return
1665}
1666
1667// DatabaseAccountsPatchFuture an abstraction for monitoring and retrieving the results of a long-running
1668// operation.
1669type DatabaseAccountsPatchFuture struct {
1670	azure.Future
1671}
1672
1673// Result returns the result of the asynchronous operation.
1674// If the operation has not completed it will return an error.
1675func (future *DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
1676	var done bool
1677	done, err = future.DoneWithContext(context.Background(), client)
1678	if err != nil {
1679		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", future.Response(), "Polling failure")
1680		return
1681	}
1682	if !done {
1683		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsPatchFuture")
1684		return
1685	}
1686	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1687	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
1688		da, err = client.PatchResponder(da.Response.Response)
1689		if err != nil {
1690			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", da.Response.Response, "Failure responding to request")
1691		}
1692	}
1693	return
1694}
1695
1696// DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a
1697// long-running operation.
1698type DatabaseAccountsRegenerateKeyFuture struct {
1699	azure.Future
1700}
1701
1702// Result returns the result of the asynchronous operation.
1703// If the operation has not completed it will return an error.
1704func (future *DatabaseAccountsRegenerateKeyFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
1705	var done bool
1706	done, err = future.DoneWithContext(context.Background(), client)
1707	if err != nil {
1708		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Polling failure")
1709		return
1710	}
1711	if !done {
1712		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
1713		return
1714	}
1715	ar.Response = future.Response()
1716	return
1717}
1718
1719// DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture an abstraction for monitoring and retrieving the
1720// results of a long-running operation.
1721type DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture struct {
1722	azure.Future
1723}
1724
1725// Result returns the result of the asynchronous operation.
1726// If the operation has not completed it will return an error.
1727func (future *DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1728	var done bool
1729	done, err = future.DoneWithContext(context.Background(), client)
1730	if err != nil {
1731		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture", "Result", future.Response(), "Polling failure")
1732		return
1733	}
1734	if !done {
1735		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture")
1736		return
1737	}
1738	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1739	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1740		t, err = client.UpdateCassandraKeyspaceThroughputResponder(t.Response.Response)
1741		if err != nil {
1742			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateCassandraKeyspaceThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1743		}
1744	}
1745	return
1746}
1747
1748// DatabaseAccountsUpdateCassandraTableThroughputFuture an abstraction for monitoring and retrieving the
1749// results of a long-running operation.
1750type DatabaseAccountsUpdateCassandraTableThroughputFuture struct {
1751	azure.Future
1752}
1753
1754// Result returns the result of the asynchronous operation.
1755// If the operation has not completed it will return an error.
1756func (future *DatabaseAccountsUpdateCassandraTableThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1757	var done bool
1758	done, err = future.DoneWithContext(context.Background(), client)
1759	if err != nil {
1760		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateCassandraTableThroughputFuture", "Result", future.Response(), "Polling failure")
1761		return
1762	}
1763	if !done {
1764		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateCassandraTableThroughputFuture")
1765		return
1766	}
1767	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1768	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1769		t, err = client.UpdateCassandraTableThroughputResponder(t.Response.Response)
1770		if err != nil {
1771			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateCassandraTableThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1772		}
1773	}
1774	return
1775}
1776
1777// DatabaseAccountsUpdateGremlinDatabaseThroughputFuture an abstraction for monitoring and retrieving the
1778// results of a long-running operation.
1779type DatabaseAccountsUpdateGremlinDatabaseThroughputFuture struct {
1780	azure.Future
1781}
1782
1783// Result returns the result of the asynchronous operation.
1784// If the operation has not completed it will return an error.
1785func (future *DatabaseAccountsUpdateGremlinDatabaseThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1786	var done bool
1787	done, err = future.DoneWithContext(context.Background(), client)
1788	if err != nil {
1789		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateGremlinDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
1790		return
1791	}
1792	if !done {
1793		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateGremlinDatabaseThroughputFuture")
1794		return
1795	}
1796	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1797	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1798		t, err = client.UpdateGremlinDatabaseThroughputResponder(t.Response.Response)
1799		if err != nil {
1800			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateGremlinDatabaseThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1801		}
1802	}
1803	return
1804}
1805
1806// DatabaseAccountsUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the
1807// results of a long-running operation.
1808type DatabaseAccountsUpdateGremlinGraphThroughputFuture struct {
1809	azure.Future
1810}
1811
1812// Result returns the result of the asynchronous operation.
1813// If the operation has not completed it will return an error.
1814func (future *DatabaseAccountsUpdateGremlinGraphThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1815	var done bool
1816	done, err = future.DoneWithContext(context.Background(), client)
1817	if err != nil {
1818		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateGremlinGraphThroughputFuture", "Result", future.Response(), "Polling failure")
1819		return
1820	}
1821	if !done {
1822		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateGremlinGraphThroughputFuture")
1823		return
1824	}
1825	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1826	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1827		t, err = client.UpdateGremlinGraphThroughputResponder(t.Response.Response)
1828		if err != nil {
1829			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateGremlinGraphThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1830		}
1831	}
1832	return
1833}
1834
1835// DatabaseAccountsUpdateMongoDBCollectionThroughputFuture an abstraction for monitoring and retrieving the
1836// results of a long-running operation.
1837type DatabaseAccountsUpdateMongoDBCollectionThroughputFuture struct {
1838	azure.Future
1839}
1840
1841// Result returns the result of the asynchronous operation.
1842// If the operation has not completed it will return an error.
1843func (future *DatabaseAccountsUpdateMongoDBCollectionThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1844	var done bool
1845	done, err = future.DoneWithContext(context.Background(), client)
1846	if err != nil {
1847		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateMongoDBCollectionThroughputFuture", "Result", future.Response(), "Polling failure")
1848		return
1849	}
1850	if !done {
1851		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateMongoDBCollectionThroughputFuture")
1852		return
1853	}
1854	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1855	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1856		t, err = client.UpdateMongoDBCollectionThroughputResponder(t.Response.Response)
1857		if err != nil {
1858			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateMongoDBCollectionThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1859		}
1860	}
1861	return
1862}
1863
1864// DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture an abstraction for monitoring and retrieving the
1865// results of a long-running operation.
1866type DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture struct {
1867	azure.Future
1868}
1869
1870// Result returns the result of the asynchronous operation.
1871// If the operation has not completed it will return an error.
1872func (future *DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1873	var done bool
1874	done, err = future.DoneWithContext(context.Background(), client)
1875	if err != nil {
1876		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
1877		return
1878	}
1879	if !done {
1880		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture")
1881		return
1882	}
1883	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1884	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1885		t, err = client.UpdateMongoDBDatabaseThroughputResponder(t.Response.Response)
1886		if err != nil {
1887			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1888		}
1889	}
1890	return
1891}
1892
1893// DatabaseAccountsUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the
1894// results of a long-running operation.
1895type DatabaseAccountsUpdateSQLContainerThroughputFuture struct {
1896	azure.Future
1897}
1898
1899// Result returns the result of the asynchronous operation.
1900// If the operation has not completed it will return an error.
1901func (future *DatabaseAccountsUpdateSQLContainerThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1902	var done bool
1903	done, err = future.DoneWithContext(context.Background(), client)
1904	if err != nil {
1905		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateSQLContainerThroughputFuture", "Result", future.Response(), "Polling failure")
1906		return
1907	}
1908	if !done {
1909		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateSQLContainerThroughputFuture")
1910		return
1911	}
1912	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1913	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1914		t, err = client.UpdateSQLContainerThroughputResponder(t.Response.Response)
1915		if err != nil {
1916			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateSQLContainerThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1917		}
1918	}
1919	return
1920}
1921
1922// DatabaseAccountsUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the
1923// results of a long-running operation.
1924type DatabaseAccountsUpdateSQLDatabaseThroughputFuture struct {
1925	azure.Future
1926}
1927
1928// Result returns the result of the asynchronous operation.
1929// If the operation has not completed it will return an error.
1930func (future *DatabaseAccountsUpdateSQLDatabaseThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1931	var done bool
1932	done, err = future.DoneWithContext(context.Background(), client)
1933	if err != nil {
1934		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateSQLDatabaseThroughputFuture", "Result", future.Response(), "Polling failure")
1935		return
1936	}
1937	if !done {
1938		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateSQLDatabaseThroughputFuture")
1939		return
1940	}
1941	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1942	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1943		t, err = client.UpdateSQLDatabaseThroughputResponder(t.Response.Response)
1944		if err != nil {
1945			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateSQLDatabaseThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1946		}
1947	}
1948	return
1949}
1950
1951// DatabaseAccountsUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of
1952// a long-running operation.
1953type DatabaseAccountsUpdateTableThroughputFuture struct {
1954	azure.Future
1955}
1956
1957// Result returns the result of the asynchronous operation.
1958// If the operation has not completed it will return an error.
1959func (future *DatabaseAccountsUpdateTableThroughputFuture) Result(client DatabaseAccountsClient) (t Throughput, err error) {
1960	var done bool
1961	done, err = future.DoneWithContext(context.Background(), client)
1962	if err != nil {
1963		err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateTableThroughputFuture", "Result", future.Response(), "Polling failure")
1964		return
1965	}
1966	if !done {
1967		err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateTableThroughputFuture")
1968		return
1969	}
1970	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1971	if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
1972		t, err = client.UpdateTableThroughputResponder(t.Response.Response)
1973		if err != nil {
1974			err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateTableThroughputFuture", "Result", t.Response.Response, "Failure responding to request")
1975		}
1976	}
1977	return
1978}
1979
1980// ErrorResponse error Response.
1981type ErrorResponse struct {
1982	// Code - Error code.
1983	Code *string `json:"code,omitempty"`
1984	// Message - Error message indicating why the operation failed.
1985	Message *string `json:"message,omitempty"`
1986}
1987
1988// ExcludedPath ...
1989type ExcludedPath struct {
1990	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
1991	Path *string `json:"path,omitempty"`
1992}
1993
1994// ExtendedResourceProperties the system generated resource properties associated with SQL databases and
1995// SQL containers.
1996type ExtendedResourceProperties struct {
1997	// Rid - A system generated property. A unique identifier.
1998	Rid *string `json:"_rid,omitempty"`
1999	// Ts - A system generated property that denotes the last updated timestamp of the resource.
2000	Ts interface{} `json:"_ts,omitempty"`
2001	// Etag - A system generated property representing the resource etag required for optimistic concurrency control.
2002	Etag *string `json:"_etag,omitempty"`
2003}
2004
2005// FailoverPolicies the list of new failover policies for the failover priority change.
2006type FailoverPolicies struct {
2007	// FailoverPolicies - List of failover policies.
2008	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
2009}
2010
2011// FailoverPolicy the failover policy for a given region of a database account.
2012type FailoverPolicy struct {
2013	// ID - READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.
2014	ID *string `json:"id,omitempty"`
2015	// LocationName - The name of the region in which the database account exists.
2016	LocationName *string `json:"locationName,omitempty"`
2017	// 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.
2018	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
2019}
2020
2021// GremlinDatabase an Azure Cosmos DB Gremlin database.
2022type GremlinDatabase struct {
2023	autorest.Response `json:"-"`
2024	// GremlinDatabaseProperties - The properties of an Azure Cosmos DB SQL database
2025	*GremlinDatabaseProperties `json:"properties,omitempty"`
2026	// ID - READ-ONLY; The unique resource identifier of the database account.
2027	ID *string `json:"id,omitempty"`
2028	// Name - READ-ONLY; The name of the database account.
2029	Name *string `json:"name,omitempty"`
2030	// Type - READ-ONLY; The type of Azure resource.
2031	Type *string `json:"type,omitempty"`
2032	// Location - The location of the resource group to which the resource belongs.
2033	Location *string            `json:"location,omitempty"`
2034	Tags     map[string]*string `json:"tags"`
2035}
2036
2037// MarshalJSON is the custom marshaler for GremlinDatabase.
2038func (gd GremlinDatabase) MarshalJSON() ([]byte, error) {
2039	objectMap := make(map[string]interface{})
2040	if gd.GremlinDatabaseProperties != nil {
2041		objectMap["properties"] = gd.GremlinDatabaseProperties
2042	}
2043	if gd.Location != nil {
2044		objectMap["location"] = gd.Location
2045	}
2046	if gd.Tags != nil {
2047		objectMap["tags"] = gd.Tags
2048	}
2049	return json.Marshal(objectMap)
2050}
2051
2052// UnmarshalJSON is the custom unmarshaler for GremlinDatabase struct.
2053func (gd *GremlinDatabase) UnmarshalJSON(body []byte) error {
2054	var m map[string]*json.RawMessage
2055	err := json.Unmarshal(body, &m)
2056	if err != nil {
2057		return err
2058	}
2059	for k, v := range m {
2060		switch k {
2061		case "properties":
2062			if v != nil {
2063				var gremlinDatabaseProperties GremlinDatabaseProperties
2064				err = json.Unmarshal(*v, &gremlinDatabaseProperties)
2065				if err != nil {
2066					return err
2067				}
2068				gd.GremlinDatabaseProperties = &gremlinDatabaseProperties
2069			}
2070		case "id":
2071			if v != nil {
2072				var ID string
2073				err = json.Unmarshal(*v, &ID)
2074				if err != nil {
2075					return err
2076				}
2077				gd.ID = &ID
2078			}
2079		case "name":
2080			if v != nil {
2081				var name string
2082				err = json.Unmarshal(*v, &name)
2083				if err != nil {
2084					return err
2085				}
2086				gd.Name = &name
2087			}
2088		case "type":
2089			if v != nil {
2090				var typeVar string
2091				err = json.Unmarshal(*v, &typeVar)
2092				if err != nil {
2093					return err
2094				}
2095				gd.Type = &typeVar
2096			}
2097		case "location":
2098			if v != nil {
2099				var location string
2100				err = json.Unmarshal(*v, &location)
2101				if err != nil {
2102					return err
2103				}
2104				gd.Location = &location
2105			}
2106		case "tags":
2107			if v != nil {
2108				var tags map[string]*string
2109				err = json.Unmarshal(*v, &tags)
2110				if err != nil {
2111					return err
2112				}
2113				gd.Tags = tags
2114			}
2115		}
2116	}
2117
2118	return nil
2119}
2120
2121// GremlinDatabaseCreateUpdateParameters parameters to create and update Cosmos DB Gremlin database.
2122type GremlinDatabaseCreateUpdateParameters struct {
2123	// GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
2124	*GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"`
2125}
2126
2127// MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateParameters.
2128func (gdcup GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
2129	objectMap := make(map[string]interface{})
2130	if gdcup.GremlinDatabaseCreateUpdateProperties != nil {
2131		objectMap["properties"] = gdcup.GremlinDatabaseCreateUpdateProperties
2132	}
2133	return json.Marshal(objectMap)
2134}
2135
2136// UnmarshalJSON is the custom unmarshaler for GremlinDatabaseCreateUpdateParameters struct.
2137func (gdcup *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
2138	var m map[string]*json.RawMessage
2139	err := json.Unmarshal(body, &m)
2140	if err != nil {
2141		return err
2142	}
2143	for k, v := range m {
2144		switch k {
2145		case "properties":
2146			if v != nil {
2147				var gremlinDatabaseCreateUpdateProperties GremlinDatabaseCreateUpdateProperties
2148				err = json.Unmarshal(*v, &gremlinDatabaseCreateUpdateProperties)
2149				if err != nil {
2150					return err
2151				}
2152				gdcup.GremlinDatabaseCreateUpdateProperties = &gremlinDatabaseCreateUpdateProperties
2153			}
2154		}
2155	}
2156
2157	return nil
2158}
2159
2160// GremlinDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin database.
2161type GremlinDatabaseCreateUpdateProperties struct {
2162	// Resource - The standard JSON format of a Gremlin database
2163	Resource *GremlinDatabaseResource `json:"resource,omitempty"`
2164	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
2165	Options map[string]*string `json:"options"`
2166}
2167
2168// MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateProperties.
2169func (gdcup GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) {
2170	objectMap := make(map[string]interface{})
2171	if gdcup.Resource != nil {
2172		objectMap["resource"] = gdcup.Resource
2173	}
2174	if gdcup.Options != nil {
2175		objectMap["options"] = gdcup.Options
2176	}
2177	return json.Marshal(objectMap)
2178}
2179
2180// GremlinDatabaseListResult the List operation response, that contains the Gremlin databases and their
2181// properties.
2182type GremlinDatabaseListResult struct {
2183	autorest.Response `json:"-"`
2184	// Value - READ-ONLY; List of Gremlin databases and their properties.
2185	Value *[]GremlinDatabase `json:"value,omitempty"`
2186}
2187
2188// GremlinDatabaseProperties the properties of an Azure Cosmos DB SQL database
2189type GremlinDatabaseProperties struct {
2190	// Rid - A system generated property. A unique identifier.
2191	Rid *string `json:"_rid,omitempty"`
2192	// Ts - A system generated property that denotes the last updated timestamp of the resource.
2193	Ts interface{} `json:"_ts,omitempty"`
2194	// Etag - A system generated property representing the resource etag required for optimistic concurrency control.
2195	Etag *string `json:"_etag,omitempty"`
2196	// ID - Name of the Cosmos DB Gremlin database
2197	ID *string `json:"id,omitempty"`
2198}
2199
2200// GremlinDatabaseResource cosmos DB Gremlin database id object
2201type GremlinDatabaseResource struct {
2202	// ID - Name of the Cosmos DB Gremlin database
2203	ID *string `json:"id,omitempty"`
2204}
2205
2206// GremlinGraph an Azure Cosmos DB Gremlin graph.
2207type GremlinGraph struct {
2208	autorest.Response `json:"-"`
2209	// GremlinGraphProperties - The properties of an Azure Cosmos DB Gremlin graph
2210	*GremlinGraphProperties `json:"properties,omitempty"`
2211	// ID - READ-ONLY; The unique resource identifier of the database account.
2212	ID *string `json:"id,omitempty"`
2213	// Name - READ-ONLY; The name of the database account.
2214	Name *string `json:"name,omitempty"`
2215	// Type - READ-ONLY; The type of Azure resource.
2216	Type *string `json:"type,omitempty"`
2217	// Location - The location of the resource group to which the resource belongs.
2218	Location *string            `json:"location,omitempty"`
2219	Tags     map[string]*string `json:"tags"`
2220}
2221
2222// MarshalJSON is the custom marshaler for GremlinGraph.
2223func (gg GremlinGraph) MarshalJSON() ([]byte, error) {
2224	objectMap := make(map[string]interface{})
2225	if gg.GremlinGraphProperties != nil {
2226		objectMap["properties"] = gg.GremlinGraphProperties
2227	}
2228	if gg.Location != nil {
2229		objectMap["location"] = gg.Location
2230	}
2231	if gg.Tags != nil {
2232		objectMap["tags"] = gg.Tags
2233	}
2234	return json.Marshal(objectMap)
2235}
2236
2237// UnmarshalJSON is the custom unmarshaler for GremlinGraph struct.
2238func (gg *GremlinGraph) UnmarshalJSON(body []byte) error {
2239	var m map[string]*json.RawMessage
2240	err := json.Unmarshal(body, &m)
2241	if err != nil {
2242		return err
2243	}
2244	for k, v := range m {
2245		switch k {
2246		case "properties":
2247			if v != nil {
2248				var gremlinGraphProperties GremlinGraphProperties
2249				err = json.Unmarshal(*v, &gremlinGraphProperties)
2250				if err != nil {
2251					return err
2252				}
2253				gg.GremlinGraphProperties = &gremlinGraphProperties
2254			}
2255		case "id":
2256			if v != nil {
2257				var ID string
2258				err = json.Unmarshal(*v, &ID)
2259				if err != nil {
2260					return err
2261				}
2262				gg.ID = &ID
2263			}
2264		case "name":
2265			if v != nil {
2266				var name string
2267				err = json.Unmarshal(*v, &name)
2268				if err != nil {
2269					return err
2270				}
2271				gg.Name = &name
2272			}
2273		case "type":
2274			if v != nil {
2275				var typeVar string
2276				err = json.Unmarshal(*v, &typeVar)
2277				if err != nil {
2278					return err
2279				}
2280				gg.Type = &typeVar
2281			}
2282		case "location":
2283			if v != nil {
2284				var location string
2285				err = json.Unmarshal(*v, &location)
2286				if err != nil {
2287					return err
2288				}
2289				gg.Location = &location
2290			}
2291		case "tags":
2292			if v != nil {
2293				var tags map[string]*string
2294				err = json.Unmarshal(*v, &tags)
2295				if err != nil {
2296					return err
2297				}
2298				gg.Tags = tags
2299			}
2300		}
2301	}
2302
2303	return nil
2304}
2305
2306// GremlinGraphCreateUpdateParameters parameters to create and update Cosmos DB Gremlin graph.
2307type GremlinGraphCreateUpdateParameters struct {
2308	// GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
2309	*GremlinGraphCreateUpdateProperties `json:"properties,omitempty"`
2310}
2311
2312// MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateParameters.
2313func (ggcup GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) {
2314	objectMap := make(map[string]interface{})
2315	if ggcup.GremlinGraphCreateUpdateProperties != nil {
2316		objectMap["properties"] = ggcup.GremlinGraphCreateUpdateProperties
2317	}
2318	return json.Marshal(objectMap)
2319}
2320
2321// UnmarshalJSON is the custom unmarshaler for GremlinGraphCreateUpdateParameters struct.
2322func (ggcup *GremlinGraphCreateUpdateParameters) UnmarshalJSON(body []byte) error {
2323	var m map[string]*json.RawMessage
2324	err := json.Unmarshal(body, &m)
2325	if err != nil {
2326		return err
2327	}
2328	for k, v := range m {
2329		switch k {
2330		case "properties":
2331			if v != nil {
2332				var gremlinGraphCreateUpdateProperties GremlinGraphCreateUpdateProperties
2333				err = json.Unmarshal(*v, &gremlinGraphCreateUpdateProperties)
2334				if err != nil {
2335					return err
2336				}
2337				ggcup.GremlinGraphCreateUpdateProperties = &gremlinGraphCreateUpdateProperties
2338			}
2339		}
2340	}
2341
2342	return nil
2343}
2344
2345// GremlinGraphCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin graph.
2346type GremlinGraphCreateUpdateProperties struct {
2347	// Resource - The standard JSON format of a Gremlin graph
2348	Resource *GremlinGraphResource `json:"resource,omitempty"`
2349	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
2350	Options map[string]*string `json:"options"`
2351}
2352
2353// MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateProperties.
2354func (ggcup GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) {
2355	objectMap := make(map[string]interface{})
2356	if ggcup.Resource != nil {
2357		objectMap["resource"] = ggcup.Resource
2358	}
2359	if ggcup.Options != nil {
2360		objectMap["options"] = ggcup.Options
2361	}
2362	return json.Marshal(objectMap)
2363}
2364
2365// GremlinGraphListResult the List operation response, that contains the graphs and their properties.
2366type GremlinGraphListResult struct {
2367	autorest.Response `json:"-"`
2368	// Value - READ-ONLY; List of graphs and their properties.
2369	Value *[]GremlinGraph `json:"value,omitempty"`
2370}
2371
2372// GremlinGraphProperties the properties of an Azure Cosmos DB Gremlin graph
2373type GremlinGraphProperties struct {
2374	// ID - Name of the Cosmos DB Gremlin graph
2375	ID *string `json:"id,omitempty"`
2376	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
2377	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
2378	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
2379	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
2380	// DefaultTTL - Default time to live
2381	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
2382	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
2383	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
2384	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
2385	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
2386	// Rid - A system generated property. A unique identifier.
2387	Rid *string `json:"_rid,omitempty"`
2388	// Ts - A system generated property that denotes the last updated timestamp of the resource.
2389	Ts interface{} `json:"_ts,omitempty"`
2390	// Etag - A system generated property representing the resource etag required for optimistic concurrency control.
2391	Etag *string `json:"_etag,omitempty"`
2392}
2393
2394// GremlinGraphResource cosmos DB Gremlin graph resource object
2395type GremlinGraphResource struct {
2396	// ID - Name of the Cosmos DB Gremlin graph
2397	ID *string `json:"id,omitempty"`
2398	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph
2399	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
2400	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
2401	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
2402	// DefaultTTL - Default time to live
2403	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
2404	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
2405	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
2406	// ConflictResolutionPolicy - The conflict resolution policy for the graph.
2407	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
2408}
2409
2410// IncludedPath the paths that are included in indexing
2411type IncludedPath struct {
2412	// Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
2413	Path *string `json:"path,omitempty"`
2414	// Indexes - List of indexes for this path
2415	Indexes *[]Indexes `json:"indexes,omitempty"`
2416}
2417
2418// Indexes the indexes for the path.
2419type Indexes struct {
2420	// DataType - The datatype for which the indexing behavior is applied to. Possible values include: 'String', 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon'
2421	DataType DataType `json:"dataType,omitempty"`
2422	// Precision - The precision of the index. -1 is maximum precision.
2423	Precision *int32 `json:"precision,omitempty"`
2424	// Kind - Indicates the type of index. Possible values include: 'Hash', 'Range', 'Spatial'
2425	Kind IndexKind `json:"kind,omitempty"`
2426}
2427
2428// IndexingPolicy cosmos DB indexing policy
2429type IndexingPolicy struct {
2430	// Automatic - Indicates if the indexing policy is automatic
2431	Automatic *bool `json:"automatic,omitempty"`
2432	// IndexingMode - Indicates the indexing mode. Possible values include: 'Consistent', 'Lazy', 'None'
2433	IndexingMode IndexingMode `json:"indexingMode,omitempty"`
2434	// IncludedPaths - List of paths to include in the indexing
2435	IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"`
2436	// ExcludedPaths - List of paths to exclude from indexing
2437	ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"`
2438}
2439
2440// Location a region in which the Azure Cosmos DB database account is deployed.
2441type Location struct {
2442	// ID - READ-ONLY; The unique identifier of the region within the database account. Example: <accountName>-<locationName>.
2443	ID *string `json:"id,omitempty"`
2444	// LocationName - The name of the region.
2445	LocationName *string `json:"locationName,omitempty"`
2446	// DocumentEndpoint - READ-ONLY; The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/
2447	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
2448	ProvisioningState *string `json:"provisioningState,omitempty"`
2449	// 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.
2450	FailoverPriority *int32 `json:"failoverPriority,omitempty"`
2451	// IsZoneRedundant - Flag to indicate whether or not this region is an AvailabilityZone region
2452	IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"`
2453}
2454
2455// Metric metric data
2456type Metric struct {
2457	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
2458	StartTime *date.Time `json:"startTime,omitempty"`
2459	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
2460	EndTime *date.Time `json:"endTime,omitempty"`
2461	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
2462	TimeGrain *string `json:"timeGrain,omitempty"`
2463	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
2464	Unit UnitType `json:"unit,omitempty"`
2465	// Name - READ-ONLY; The name information for the metric.
2466	Name *MetricName `json:"name,omitempty"`
2467	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
2468	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
2469}
2470
2471// MetricAvailability the availability of the metric.
2472type MetricAvailability struct {
2473	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
2474	TimeGrain *string `json:"timeGrain,omitempty"`
2475	// Retention - READ-ONLY; The retention for the metric values.
2476	Retention *string `json:"retention,omitempty"`
2477}
2478
2479// MetricDefinition the definition of a metric.
2480type MetricDefinition struct {
2481	// MetricAvailabilities - READ-ONLY; The list of metric availabilities for the account.
2482	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
2483	// PrimaryAggregationType - READ-ONLY; The primary aggregation type of the metric. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeTotal', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeLast'
2484	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
2485	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
2486	Unit UnitType `json:"unit,omitempty"`
2487	// ResourceURI - READ-ONLY; The resource uri of the database.
2488	ResourceURI *string `json:"resourceUri,omitempty"`
2489	// Name - READ-ONLY; The name information for the metric.
2490	Name *MetricName `json:"name,omitempty"`
2491}
2492
2493// MetricDefinitionsListResult the response to a list metric definitions request.
2494type MetricDefinitionsListResult struct {
2495	autorest.Response `json:"-"`
2496	// Value - READ-ONLY; The list of metric definitions for the account.
2497	Value *[]MetricDefinition `json:"value,omitempty"`
2498}
2499
2500// MetricListResult the response to a list metrics request.
2501type MetricListResult struct {
2502	autorest.Response `json:"-"`
2503	// Value - READ-ONLY; The list of metrics for the account.
2504	Value *[]Metric `json:"value,omitempty"`
2505}
2506
2507// MetricName a metric name.
2508type MetricName struct {
2509	// Value - READ-ONLY; The name of the metric.
2510	Value *string `json:"value,omitempty"`
2511	// LocalizedValue - READ-ONLY; The friendly name of the metric.
2512	LocalizedValue *string `json:"localizedValue,omitempty"`
2513}
2514
2515// MetricValue represents metrics values.
2516type MetricValue struct {
2517	// Count - READ-ONLY; The number of values for the metric.
2518	Count *float64 `json:"_count,omitempty"`
2519	// Average - READ-ONLY; The average value of the metric.
2520	Average *float64 `json:"average,omitempty"`
2521	// Maximum - READ-ONLY; The max value of the metric.
2522	Maximum *float64 `json:"maximum,omitempty"`
2523	// Minimum - READ-ONLY; The min value of the metric.
2524	Minimum *float64 `json:"minimum,omitempty"`
2525	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
2526	Timestamp *date.Time `json:"timestamp,omitempty"`
2527	// Total - READ-ONLY; The total value of the metric.
2528	Total *float64 `json:"total,omitempty"`
2529}
2530
2531// MongoDBCollection an Azure Cosmos DB MongoDB collection.
2532type MongoDBCollection struct {
2533	autorest.Response `json:"-"`
2534	// MongoDBCollectionProperties - The properties of an Azure Cosmos DB MongoDB collection
2535	*MongoDBCollectionProperties `json:"properties,omitempty"`
2536	// ID - READ-ONLY; The unique resource identifier of the database account.
2537	ID *string `json:"id,omitempty"`
2538	// Name - READ-ONLY; The name of the database account.
2539	Name *string `json:"name,omitempty"`
2540	// Type - READ-ONLY; The type of Azure resource.
2541	Type *string `json:"type,omitempty"`
2542	// Location - The location of the resource group to which the resource belongs.
2543	Location *string            `json:"location,omitempty"`
2544	Tags     map[string]*string `json:"tags"`
2545}
2546
2547// MarshalJSON is the custom marshaler for MongoDBCollection.
2548func (mdc MongoDBCollection) MarshalJSON() ([]byte, error) {
2549	objectMap := make(map[string]interface{})
2550	if mdc.MongoDBCollectionProperties != nil {
2551		objectMap["properties"] = mdc.MongoDBCollectionProperties
2552	}
2553	if mdc.Location != nil {
2554		objectMap["location"] = mdc.Location
2555	}
2556	if mdc.Tags != nil {
2557		objectMap["tags"] = mdc.Tags
2558	}
2559	return json.Marshal(objectMap)
2560}
2561
2562// UnmarshalJSON is the custom unmarshaler for MongoDBCollection struct.
2563func (mdc *MongoDBCollection) UnmarshalJSON(body []byte) error {
2564	var m map[string]*json.RawMessage
2565	err := json.Unmarshal(body, &m)
2566	if err != nil {
2567		return err
2568	}
2569	for k, v := range m {
2570		switch k {
2571		case "properties":
2572			if v != nil {
2573				var mongoDBCollectionProperties MongoDBCollectionProperties
2574				err = json.Unmarshal(*v, &mongoDBCollectionProperties)
2575				if err != nil {
2576					return err
2577				}
2578				mdc.MongoDBCollectionProperties = &mongoDBCollectionProperties
2579			}
2580		case "id":
2581			if v != nil {
2582				var ID string
2583				err = json.Unmarshal(*v, &ID)
2584				if err != nil {
2585					return err
2586				}
2587				mdc.ID = &ID
2588			}
2589		case "name":
2590			if v != nil {
2591				var name string
2592				err = json.Unmarshal(*v, &name)
2593				if err != nil {
2594					return err
2595				}
2596				mdc.Name = &name
2597			}
2598		case "type":
2599			if v != nil {
2600				var typeVar string
2601				err = json.Unmarshal(*v, &typeVar)
2602				if err != nil {
2603					return err
2604				}
2605				mdc.Type = &typeVar
2606			}
2607		case "location":
2608			if v != nil {
2609				var location string
2610				err = json.Unmarshal(*v, &location)
2611				if err != nil {
2612					return err
2613				}
2614				mdc.Location = &location
2615			}
2616		case "tags":
2617			if v != nil {
2618				var tags map[string]*string
2619				err = json.Unmarshal(*v, &tags)
2620				if err != nil {
2621					return err
2622				}
2623				mdc.Tags = tags
2624			}
2625		}
2626	}
2627
2628	return nil
2629}
2630
2631// MongoDBCollectionCreateUpdateParameters parameters to create and update Cosmos DB MongoDB collection.
2632type MongoDBCollectionCreateUpdateParameters struct {
2633	// MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
2634	*MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"`
2635}
2636
2637// MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateParameters.
2638func (mdccup MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) {
2639	objectMap := make(map[string]interface{})
2640	if mdccup.MongoDBCollectionCreateUpdateProperties != nil {
2641		objectMap["properties"] = mdccup.MongoDBCollectionCreateUpdateProperties
2642	}
2643	return json.Marshal(objectMap)
2644}
2645
2646// UnmarshalJSON is the custom unmarshaler for MongoDBCollectionCreateUpdateParameters struct.
2647func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte) error {
2648	var m map[string]*json.RawMessage
2649	err := json.Unmarshal(body, &m)
2650	if err != nil {
2651		return err
2652	}
2653	for k, v := range m {
2654		switch k {
2655		case "properties":
2656			if v != nil {
2657				var mongoDBCollectionCreateUpdateProperties MongoDBCollectionCreateUpdateProperties
2658				err = json.Unmarshal(*v, &mongoDBCollectionCreateUpdateProperties)
2659				if err != nil {
2660					return err
2661				}
2662				mdccup.MongoDBCollectionCreateUpdateProperties = &mongoDBCollectionCreateUpdateProperties
2663			}
2664		}
2665	}
2666
2667	return nil
2668}
2669
2670// MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB
2671// collection.
2672type MongoDBCollectionCreateUpdateProperties struct {
2673	// Resource - The standard JSON format of a MongoDB collection
2674	Resource *MongoDBCollectionResource `json:"resource,omitempty"`
2675	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
2676	Options map[string]*string `json:"options"`
2677}
2678
2679// MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateProperties.
2680func (mdccup MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, error) {
2681	objectMap := make(map[string]interface{})
2682	if mdccup.Resource != nil {
2683		objectMap["resource"] = mdccup.Resource
2684	}
2685	if mdccup.Options != nil {
2686		objectMap["options"] = mdccup.Options
2687	}
2688	return json.Marshal(objectMap)
2689}
2690
2691// MongoDBCollectionListResult the List operation response, that contains the MongoDB collections and their
2692// properties.
2693type MongoDBCollectionListResult struct {
2694	autorest.Response `json:"-"`
2695	// Value - READ-ONLY; List of MongoDB collections and their properties.
2696	Value *[]MongoDBCollection `json:"value,omitempty"`
2697}
2698
2699// MongoDBCollectionProperties the properties of an Azure Cosmos DB MongoDB collection
2700type MongoDBCollectionProperties struct {
2701	// ID - Name of the Cosmos DB MongoDB collection
2702	ID *string `json:"id,omitempty"`
2703	// ShardKey - A key-value pair of shard keys to be applied for the request.
2704	ShardKey map[string]*string `json:"shardKey"`
2705	// Indexes - List of index keys
2706	Indexes *[]MongoIndex `json:"indexes,omitempty"`
2707}
2708
2709// MarshalJSON is the custom marshaler for MongoDBCollectionProperties.
2710func (mdcp MongoDBCollectionProperties) MarshalJSON() ([]byte, error) {
2711	objectMap := make(map[string]interface{})
2712	if mdcp.ID != nil {
2713		objectMap["id"] = mdcp.ID
2714	}
2715	if mdcp.ShardKey != nil {
2716		objectMap["shardKey"] = mdcp.ShardKey
2717	}
2718	if mdcp.Indexes != nil {
2719		objectMap["indexes"] = mdcp.Indexes
2720	}
2721	return json.Marshal(objectMap)
2722}
2723
2724// MongoDBCollectionResource cosmos DB MongoDB collection resource object
2725type MongoDBCollectionResource struct {
2726	// ID - Name of the Cosmos DB MongoDB collection
2727	ID *string `json:"id,omitempty"`
2728	// ShardKey - A key-value pair of shard keys to be applied for the request.
2729	ShardKey map[string]*string `json:"shardKey"`
2730	// Indexes - List of index keys
2731	Indexes *[]MongoIndex `json:"indexes,omitempty"`
2732}
2733
2734// MarshalJSON is the custom marshaler for MongoDBCollectionResource.
2735func (mdcr MongoDBCollectionResource) MarshalJSON() ([]byte, error) {
2736	objectMap := make(map[string]interface{})
2737	if mdcr.ID != nil {
2738		objectMap["id"] = mdcr.ID
2739	}
2740	if mdcr.ShardKey != nil {
2741		objectMap["shardKey"] = mdcr.ShardKey
2742	}
2743	if mdcr.Indexes != nil {
2744		objectMap["indexes"] = mdcr.Indexes
2745	}
2746	return json.Marshal(objectMap)
2747}
2748
2749// MongoDBDatabase an Azure Cosmos DB MongoDB database.
2750type MongoDBDatabase struct {
2751	autorest.Response `json:"-"`
2752	// MongoDBDatabaseProperties - The properties of an Azure Cosmos DB MongoDB database
2753	*MongoDBDatabaseProperties `json:"properties,omitempty"`
2754	// ID - READ-ONLY; The unique resource identifier of the database account.
2755	ID *string `json:"id,omitempty"`
2756	// Name - READ-ONLY; The name of the database account.
2757	Name *string `json:"name,omitempty"`
2758	// Type - READ-ONLY; The type of Azure resource.
2759	Type *string `json:"type,omitempty"`
2760	// Location - The location of the resource group to which the resource belongs.
2761	Location *string            `json:"location,omitempty"`
2762	Tags     map[string]*string `json:"tags"`
2763}
2764
2765// MarshalJSON is the custom marshaler for MongoDBDatabase.
2766func (mdd MongoDBDatabase) MarshalJSON() ([]byte, error) {
2767	objectMap := make(map[string]interface{})
2768	if mdd.MongoDBDatabaseProperties != nil {
2769		objectMap["properties"] = mdd.MongoDBDatabaseProperties
2770	}
2771	if mdd.Location != nil {
2772		objectMap["location"] = mdd.Location
2773	}
2774	if mdd.Tags != nil {
2775		objectMap["tags"] = mdd.Tags
2776	}
2777	return json.Marshal(objectMap)
2778}
2779
2780// UnmarshalJSON is the custom unmarshaler for MongoDBDatabase struct.
2781func (mdd *MongoDBDatabase) UnmarshalJSON(body []byte) error {
2782	var m map[string]*json.RawMessage
2783	err := json.Unmarshal(body, &m)
2784	if err != nil {
2785		return err
2786	}
2787	for k, v := range m {
2788		switch k {
2789		case "properties":
2790			if v != nil {
2791				var mongoDBDatabaseProperties MongoDBDatabaseProperties
2792				err = json.Unmarshal(*v, &mongoDBDatabaseProperties)
2793				if err != nil {
2794					return err
2795				}
2796				mdd.MongoDBDatabaseProperties = &mongoDBDatabaseProperties
2797			}
2798		case "id":
2799			if v != nil {
2800				var ID string
2801				err = json.Unmarshal(*v, &ID)
2802				if err != nil {
2803					return err
2804				}
2805				mdd.ID = &ID
2806			}
2807		case "name":
2808			if v != nil {
2809				var name string
2810				err = json.Unmarshal(*v, &name)
2811				if err != nil {
2812					return err
2813				}
2814				mdd.Name = &name
2815			}
2816		case "type":
2817			if v != nil {
2818				var typeVar string
2819				err = json.Unmarshal(*v, &typeVar)
2820				if err != nil {
2821					return err
2822				}
2823				mdd.Type = &typeVar
2824			}
2825		case "location":
2826			if v != nil {
2827				var location string
2828				err = json.Unmarshal(*v, &location)
2829				if err != nil {
2830					return err
2831				}
2832				mdd.Location = &location
2833			}
2834		case "tags":
2835			if v != nil {
2836				var tags map[string]*string
2837				err = json.Unmarshal(*v, &tags)
2838				if err != nil {
2839					return err
2840				}
2841				mdd.Tags = tags
2842			}
2843		}
2844	}
2845
2846	return nil
2847}
2848
2849// MongoDBDatabaseCreateUpdateParameters parameters to create and update Cosmos DB MongoDB database.
2850type MongoDBDatabaseCreateUpdateParameters struct {
2851	// MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
2852	*MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"`
2853}
2854
2855// MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateParameters.
2856func (mddcup MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
2857	objectMap := make(map[string]interface{})
2858	if mddcup.MongoDBDatabaseCreateUpdateProperties != nil {
2859		objectMap["properties"] = mddcup.MongoDBDatabaseCreateUpdateProperties
2860	}
2861	return json.Marshal(objectMap)
2862}
2863
2864// UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseCreateUpdateParameters struct.
2865func (mddcup *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
2866	var m map[string]*json.RawMessage
2867	err := json.Unmarshal(body, &m)
2868	if err != nil {
2869		return err
2870	}
2871	for k, v := range m {
2872		switch k {
2873		case "properties":
2874			if v != nil {
2875				var mongoDBDatabaseCreateUpdateProperties MongoDBDatabaseCreateUpdateProperties
2876				err = json.Unmarshal(*v, &mongoDBDatabaseCreateUpdateProperties)
2877				if err != nil {
2878					return err
2879				}
2880				mddcup.MongoDBDatabaseCreateUpdateProperties = &mongoDBDatabaseCreateUpdateProperties
2881			}
2882		}
2883	}
2884
2885	return nil
2886}
2887
2888// MongoDBDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB database.
2889type MongoDBDatabaseCreateUpdateProperties struct {
2890	// Resource - The standard JSON format of a MongoDB database
2891	Resource *MongoDBDatabaseResource `json:"resource,omitempty"`
2892	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
2893	Options map[string]*string `json:"options"`
2894}
2895
2896// MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateProperties.
2897func (mddcup MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) {
2898	objectMap := make(map[string]interface{})
2899	if mddcup.Resource != nil {
2900		objectMap["resource"] = mddcup.Resource
2901	}
2902	if mddcup.Options != nil {
2903		objectMap["options"] = mddcup.Options
2904	}
2905	return json.Marshal(objectMap)
2906}
2907
2908// MongoDBDatabaseListResult the List operation response, that contains the MongoDB databases and their
2909// properties.
2910type MongoDBDatabaseListResult struct {
2911	autorest.Response `json:"-"`
2912	// Value - READ-ONLY; List of MongoDB databases and their properties.
2913	Value *[]MongoDBDatabase `json:"value,omitempty"`
2914}
2915
2916// MongoDBDatabaseProperties the properties of an Azure Cosmos DB MongoDB database
2917type MongoDBDatabaseProperties struct {
2918	// ID - Name of the Cosmos DB MongoDB database
2919	ID *string `json:"id,omitempty"`
2920}
2921
2922// MongoDBDatabaseResource cosmos DB MongoDB database id object
2923type MongoDBDatabaseResource struct {
2924	// ID - Name of the Cosmos DB MongoDB database
2925	ID *string `json:"id,omitempty"`
2926}
2927
2928// MongoIndex cosmos DB MongoDB collection index key
2929type MongoIndex struct {
2930	// Key - Cosmos DB MongoDB collection index keys
2931	Key *MongoIndexKeys `json:"key,omitempty"`
2932	// Options - Cosmos DB MongoDB collection index key options
2933	Options *MongoIndexOptions `json:"options,omitempty"`
2934}
2935
2936// MongoIndexKeys cosmos DB MongoDB collection resource object
2937type MongoIndexKeys struct {
2938	// Keys - List of keys for each MongoDB collection in the Azure Cosmos DB service
2939	Keys *[]string `json:"keys,omitempty"`
2940}
2941
2942// MongoIndexOptions cosmos DB MongoDB collection index options
2943type MongoIndexOptions struct {
2944	// ExpireAfterSeconds - Expire after seconds
2945	ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"`
2946	// Unique - Is unique or not
2947	Unique *bool `json:"unique,omitempty"`
2948}
2949
2950// Operation REST API operation
2951type Operation struct {
2952	// Name - Operation name: {provider}/{resource}/{operation}
2953	Name *string `json:"name,omitempty"`
2954	// Display - The object that represents the operation.
2955	Display *OperationDisplay `json:"display,omitempty"`
2956}
2957
2958// OperationDisplay the object that represents the operation.
2959type OperationDisplay struct {
2960	// Provider - Service provider: Microsoft.ResourceProvider
2961	Provider *string `json:"Provider,omitempty"`
2962	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
2963	Resource *string `json:"Resource,omitempty"`
2964	// Operation - Operation type: Read, write, delete, etc.
2965	Operation *string `json:"Operation,omitempty"`
2966	// Description - Description of operation
2967	Description *string `json:"Description,omitempty"`
2968}
2969
2970// OperationListResult result of the request to list Resource Provider operations. It contains a list of
2971// operations and a URL link to get the next set of results.
2972type OperationListResult struct {
2973	autorest.Response `json:"-"`
2974	// Value - List of operations supported by the Resource Provider.
2975	Value *[]Operation `json:"value,omitempty"`
2976	// NextLink - URL to get the next set of operation list results if there are any.
2977	NextLink *string `json:"nextLink,omitempty"`
2978}
2979
2980// OperationListResultIterator provides access to a complete listing of Operation values.
2981type OperationListResultIterator struct {
2982	i    int
2983	page OperationListResultPage
2984}
2985
2986// NextWithContext advances to the next value.  If there was an error making
2987// the request the iterator does not advance and the error is returned.
2988func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2989	if tracing.IsEnabled() {
2990		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
2991		defer func() {
2992			sc := -1
2993			if iter.Response().Response.Response != nil {
2994				sc = iter.Response().Response.Response.StatusCode
2995			}
2996			tracing.EndSpan(ctx, sc, err)
2997		}()
2998	}
2999	iter.i++
3000	if iter.i < len(iter.page.Values()) {
3001		return nil
3002	}
3003	err = iter.page.NextWithContext(ctx)
3004	if err != nil {
3005		iter.i--
3006		return err
3007	}
3008	iter.i = 0
3009	return nil
3010}
3011
3012// Next advances to the next value.  If there was an error making
3013// the request the iterator does not advance and the error is returned.
3014// Deprecated: Use NextWithContext() instead.
3015func (iter *OperationListResultIterator) Next() error {
3016	return iter.NextWithContext(context.Background())
3017}
3018
3019// NotDone returns true if the enumeration should be started or is not yet complete.
3020func (iter OperationListResultIterator) NotDone() bool {
3021	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3022}
3023
3024// Response returns the raw server response from the last page request.
3025func (iter OperationListResultIterator) Response() OperationListResult {
3026	return iter.page.Response()
3027}
3028
3029// Value returns the current value or a zero-initialized value if the
3030// iterator has advanced beyond the end of the collection.
3031func (iter OperationListResultIterator) Value() Operation {
3032	if !iter.page.NotDone() {
3033		return Operation{}
3034	}
3035	return iter.page.Values()[iter.i]
3036}
3037
3038// Creates a new instance of the OperationListResultIterator type.
3039func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
3040	return OperationListResultIterator{page: page}
3041}
3042
3043// IsEmpty returns true if the ListResult contains no values.
3044func (olr OperationListResult) IsEmpty() bool {
3045	return olr.Value == nil || len(*olr.Value) == 0
3046}
3047
3048// operationListResultPreparer prepares a request to retrieve the next set of results.
3049// It returns nil if no more results exist.
3050func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
3051	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
3052		return nil, nil
3053	}
3054	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3055		autorest.AsJSON(),
3056		autorest.AsGet(),
3057		autorest.WithBaseURL(to.String(olr.NextLink)))
3058}
3059
3060// OperationListResultPage contains a page of Operation values.
3061type OperationListResultPage struct {
3062	fn  func(context.Context, OperationListResult) (OperationListResult, error)
3063	olr OperationListResult
3064}
3065
3066// NextWithContext advances to the next page of values.  If there was an error making
3067// the request the page does not advance and the error is returned.
3068func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
3069	if tracing.IsEnabled() {
3070		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
3071		defer func() {
3072			sc := -1
3073			if page.Response().Response.Response != nil {
3074				sc = page.Response().Response.Response.StatusCode
3075			}
3076			tracing.EndSpan(ctx, sc, err)
3077		}()
3078	}
3079	next, err := page.fn(ctx, page.olr)
3080	if err != nil {
3081		return err
3082	}
3083	page.olr = next
3084	return nil
3085}
3086
3087// Next advances to the next page of values.  If there was an error making
3088// the request the page does not advance and the error is returned.
3089// Deprecated: Use NextWithContext() instead.
3090func (page *OperationListResultPage) Next() error {
3091	return page.NextWithContext(context.Background())
3092}
3093
3094// NotDone returns true if the page enumeration should be started or is not yet complete.
3095func (page OperationListResultPage) NotDone() bool {
3096	return !page.olr.IsEmpty()
3097}
3098
3099// Response returns the raw server response from the last page request.
3100func (page OperationListResultPage) Response() OperationListResult {
3101	return page.olr
3102}
3103
3104// Values returns the slice of values for the current page or nil if there are no values.
3105func (page OperationListResultPage) Values() []Operation {
3106	if page.olr.IsEmpty() {
3107		return nil
3108	}
3109	return *page.olr.Value
3110}
3111
3112// Creates a new instance of the OperationListResultPage type.
3113func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
3114	return OperationListResultPage{fn: getNextPage}
3115}
3116
3117// PartitionMetric the metric values for a single partition.
3118type PartitionMetric struct {
3119	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the metric values.
3120	PartitionID *string `json:"partitionId,omitempty"`
3121	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the metric values.
3122	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
3123	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
3124	StartTime *date.Time `json:"startTime,omitempty"`
3125	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
3126	EndTime *date.Time `json:"endTime,omitempty"`
3127	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
3128	TimeGrain *string `json:"timeGrain,omitempty"`
3129	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
3130	Unit UnitType `json:"unit,omitempty"`
3131	// Name - READ-ONLY; The name information for the metric.
3132	Name *MetricName `json:"name,omitempty"`
3133	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
3134	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
3135}
3136
3137// PartitionMetricListResult the response to a list partition metrics request.
3138type PartitionMetricListResult struct {
3139	autorest.Response `json:"-"`
3140	// Value - READ-ONLY; The list of partition-level metrics for the account.
3141	Value *[]PartitionMetric `json:"value,omitempty"`
3142}
3143
3144// PartitionUsage the partition level usage data for a usage request.
3145type PartitionUsage struct {
3146	// PartitionID - READ-ONLY; The partition id (GUID identifier) of the usages.
3147	PartitionID *string `json:"partitionId,omitempty"`
3148	// PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the usages.
3149	PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
3150	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
3151	Unit UnitType `json:"unit,omitempty"`
3152	// Name - READ-ONLY; The name information for the metric.
3153	Name *MetricName `json:"name,omitempty"`
3154	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
3155	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
3156	// Limit - READ-ONLY; Maximum value for this metric
3157	Limit *int64 `json:"limit,omitempty"`
3158	// CurrentValue - READ-ONLY; Current value for this metric
3159	CurrentValue *int64 `json:"currentValue,omitempty"`
3160}
3161
3162// PartitionUsagesResult the response to a list partition level usage request.
3163type PartitionUsagesResult struct {
3164	autorest.Response `json:"-"`
3165	// Value - READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric
3166	Value *[]PartitionUsage `json:"value,omitempty"`
3167}
3168
3169// PercentileMetric percentile Metric data
3170type PercentileMetric struct {
3171	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
3172	StartTime *date.Time `json:"startTime,omitempty"`
3173	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
3174	EndTime *date.Time `json:"endTime,omitempty"`
3175	// TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values.
3176	TimeGrain *string `json:"timeGrain,omitempty"`
3177	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
3178	Unit UnitType `json:"unit,omitempty"`
3179	// Name - READ-ONLY; The name information for the metric.
3180	Name *MetricName `json:"name,omitempty"`
3181	// MetricValues - READ-ONLY; The percentile metric values for the specified time window and timestep.
3182	MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"`
3183}
3184
3185// PercentileMetricListResult the response to a list percentile metrics request.
3186type PercentileMetricListResult struct {
3187	autorest.Response `json:"-"`
3188	// Value - READ-ONLY; The list of percentile metrics for the account.
3189	Value *[]PercentileMetric `json:"value,omitempty"`
3190}
3191
3192// PercentileMetricValue represents percentile metrics values.
3193type PercentileMetricValue struct {
3194	// P10 - READ-ONLY; The 10th percentile value for the metric.
3195	P10 *float64 `json:"P10,omitempty"`
3196	// P25 - READ-ONLY; The 25th percentile value for the metric.
3197	P25 *float64 `json:"P25,omitempty"`
3198	// P50 - READ-ONLY; The 50th percentile value for the metric.
3199	P50 *float64 `json:"P50,omitempty"`
3200	// P75 - READ-ONLY; The 75th percentile value for the metric.
3201	P75 *float64 `json:"P75,omitempty"`
3202	// P90 - READ-ONLY; The 90th percentile value for the metric.
3203	P90 *float64 `json:"P90,omitempty"`
3204	// P95 - READ-ONLY; The 95th percentile value for the metric.
3205	P95 *float64 `json:"P95,omitempty"`
3206	// P99 - READ-ONLY; The 99th percentile value for the metric.
3207	P99 *float64 `json:"P99,omitempty"`
3208	// Count - READ-ONLY; The number of values for the metric.
3209	Count *float64 `json:"_count,omitempty"`
3210	// Average - READ-ONLY; The average value of the metric.
3211	Average *float64 `json:"average,omitempty"`
3212	// Maximum - READ-ONLY; The max value of the metric.
3213	Maximum *float64 `json:"maximum,omitempty"`
3214	// Minimum - READ-ONLY; The min value of the metric.
3215	Minimum *float64 `json:"minimum,omitempty"`
3216	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
3217	Timestamp *date.Time `json:"timestamp,omitempty"`
3218	// Total - READ-ONLY; The total value of the metric.
3219	Total *float64 `json:"total,omitempty"`
3220}
3221
3222// RegionForOnlineOffline cosmos DB region to online or offline.
3223type RegionForOnlineOffline struct {
3224	// Region - Cosmos DB region, with spaces between words and each word capitalized.
3225	Region *string `json:"region,omitempty"`
3226}
3227
3228// Resource the core properties of ARM resources.
3229type Resource struct {
3230	// ID - READ-ONLY; The unique resource identifier of the database account.
3231	ID *string `json:"id,omitempty"`
3232	// Name - READ-ONLY; The name of the database account.
3233	Name *string `json:"name,omitempty"`
3234	// Type - READ-ONLY; The type of Azure resource.
3235	Type *string `json:"type,omitempty"`
3236	// Location - The location of the resource group to which the resource belongs.
3237	Location *string            `json:"location,omitempty"`
3238	Tags     map[string]*string `json:"tags"`
3239}
3240
3241// MarshalJSON is the custom marshaler for Resource.
3242func (r Resource) MarshalJSON() ([]byte, error) {
3243	objectMap := make(map[string]interface{})
3244	if r.Location != nil {
3245		objectMap["location"] = r.Location
3246	}
3247	if r.Tags != nil {
3248		objectMap["tags"] = r.Tags
3249	}
3250	return json.Marshal(objectMap)
3251}
3252
3253// SQLContainer an Azure Cosmos DB container.
3254type SQLContainer struct {
3255	autorest.Response `json:"-"`
3256	// SQLContainerProperties - The properties of an Azure Cosmos DB container
3257	*SQLContainerProperties `json:"properties,omitempty"`
3258	// ID - READ-ONLY; The unique resource identifier of the database account.
3259	ID *string `json:"id,omitempty"`
3260	// Name - READ-ONLY; The name of the database account.
3261	Name *string `json:"name,omitempty"`
3262	// Type - READ-ONLY; The type of Azure resource.
3263	Type *string `json:"type,omitempty"`
3264	// Location - The location of the resource group to which the resource belongs.
3265	Location *string            `json:"location,omitempty"`
3266	Tags     map[string]*string `json:"tags"`
3267}
3268
3269// MarshalJSON is the custom marshaler for SQLContainer.
3270func (sc SQLContainer) MarshalJSON() ([]byte, error) {
3271	objectMap := make(map[string]interface{})
3272	if sc.SQLContainerProperties != nil {
3273		objectMap["properties"] = sc.SQLContainerProperties
3274	}
3275	if sc.Location != nil {
3276		objectMap["location"] = sc.Location
3277	}
3278	if sc.Tags != nil {
3279		objectMap["tags"] = sc.Tags
3280	}
3281	return json.Marshal(objectMap)
3282}
3283
3284// UnmarshalJSON is the custom unmarshaler for SQLContainer struct.
3285func (sc *SQLContainer) UnmarshalJSON(body []byte) error {
3286	var m map[string]*json.RawMessage
3287	err := json.Unmarshal(body, &m)
3288	if err != nil {
3289		return err
3290	}
3291	for k, v := range m {
3292		switch k {
3293		case "properties":
3294			if v != nil {
3295				var SQLContainerProperties SQLContainerProperties
3296				err = json.Unmarshal(*v, &SQLContainerProperties)
3297				if err != nil {
3298					return err
3299				}
3300				sc.SQLContainerProperties = &SQLContainerProperties
3301			}
3302		case "id":
3303			if v != nil {
3304				var ID string
3305				err = json.Unmarshal(*v, &ID)
3306				if err != nil {
3307					return err
3308				}
3309				sc.ID = &ID
3310			}
3311		case "name":
3312			if v != nil {
3313				var name string
3314				err = json.Unmarshal(*v, &name)
3315				if err != nil {
3316					return err
3317				}
3318				sc.Name = &name
3319			}
3320		case "type":
3321			if v != nil {
3322				var typeVar string
3323				err = json.Unmarshal(*v, &typeVar)
3324				if err != nil {
3325					return err
3326				}
3327				sc.Type = &typeVar
3328			}
3329		case "location":
3330			if v != nil {
3331				var location string
3332				err = json.Unmarshal(*v, &location)
3333				if err != nil {
3334					return err
3335				}
3336				sc.Location = &location
3337			}
3338		case "tags":
3339			if v != nil {
3340				var tags map[string]*string
3341				err = json.Unmarshal(*v, &tags)
3342				if err != nil {
3343					return err
3344				}
3345				sc.Tags = tags
3346			}
3347		}
3348	}
3349
3350	return nil
3351}
3352
3353// SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container.
3354type SQLContainerCreateUpdateParameters struct {
3355	// SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
3356	*SQLContainerCreateUpdateProperties `json:"properties,omitempty"`
3357}
3358
3359// MarshalJSON is the custom marshaler for SQLContainerCreateUpdateParameters.
3360func (sccup SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) {
3361	objectMap := make(map[string]interface{})
3362	if sccup.SQLContainerCreateUpdateProperties != nil {
3363		objectMap["properties"] = sccup.SQLContainerCreateUpdateProperties
3364	}
3365	return json.Marshal(objectMap)
3366}
3367
3368// UnmarshalJSON is the custom unmarshaler for SQLContainerCreateUpdateParameters struct.
3369func (sccup *SQLContainerCreateUpdateParameters) UnmarshalJSON(body []byte) error {
3370	var m map[string]*json.RawMessage
3371	err := json.Unmarshal(body, &m)
3372	if err != nil {
3373		return err
3374	}
3375	for k, v := range m {
3376		switch k {
3377		case "properties":
3378			if v != nil {
3379				var SQLContainerCreateUpdateProperties SQLContainerCreateUpdateProperties
3380				err = json.Unmarshal(*v, &SQLContainerCreateUpdateProperties)
3381				if err != nil {
3382					return err
3383				}
3384				sccup.SQLContainerCreateUpdateProperties = &SQLContainerCreateUpdateProperties
3385			}
3386		}
3387	}
3388
3389	return nil
3390}
3391
3392// SQLContainerCreateUpdateProperties properties to create and update Azure Cosmos DB container.
3393type SQLContainerCreateUpdateProperties struct {
3394	// Resource - The standard JSON format of a container
3395	Resource *SQLContainerResource `json:"resource,omitempty"`
3396	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
3397	Options map[string]*string `json:"options"`
3398}
3399
3400// MarshalJSON is the custom marshaler for SQLContainerCreateUpdateProperties.
3401func (sccup SQLContainerCreateUpdateProperties) MarshalJSON() ([]byte, error) {
3402	objectMap := make(map[string]interface{})
3403	if sccup.Resource != nil {
3404		objectMap["resource"] = sccup.Resource
3405	}
3406	if sccup.Options != nil {
3407		objectMap["options"] = sccup.Options
3408	}
3409	return json.Marshal(objectMap)
3410}
3411
3412// SQLContainerListResult the List operation response, that contains the containers and their properties.
3413type SQLContainerListResult struct {
3414	autorest.Response `json:"-"`
3415	// Value - READ-ONLY; List of containers and their properties.
3416	Value *[]SQLContainer `json:"value,omitempty"`
3417}
3418
3419// SQLContainerProperties the properties of an Azure Cosmos DB container
3420type SQLContainerProperties struct {
3421	// ID - Name of the Cosmos DB SQL container
3422	ID *string `json:"id,omitempty"`
3423	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
3424	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
3425	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
3426	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
3427	// DefaultTTL - Default time to live
3428	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
3429	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
3430	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
3431	// ConflictResolutionPolicy - The conflict resolution policy for the container.
3432	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
3433	// Rid - A system generated property. A unique identifier.
3434	Rid *string `json:"_rid,omitempty"`
3435	// Ts - A system generated property that denotes the last updated timestamp of the resource.
3436	Ts interface{} `json:"_ts,omitempty"`
3437	// Etag - A system generated property representing the resource etag required for optimistic concurrency control.
3438	Etag *string `json:"_etag,omitempty"`
3439}
3440
3441// SQLContainerResource cosmos DB SQL container resource object
3442type SQLContainerResource struct {
3443	// ID - Name of the Cosmos DB SQL container
3444	ID *string `json:"id,omitempty"`
3445	// IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
3446	IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"`
3447	// PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
3448	PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"`
3449	// DefaultTTL - Default time to live
3450	DefaultTTL *int32 `json:"defaultTtl,omitempty"`
3451	// UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
3452	UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"`
3453	// ConflictResolutionPolicy - The conflict resolution policy for the container.
3454	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
3455}
3456
3457// SQLDatabase an Azure Cosmos DB SQL database.
3458type SQLDatabase struct {
3459	autorest.Response `json:"-"`
3460	// SQLDatabaseProperties - The properties of an Azure Cosmos DB SQL database
3461	*SQLDatabaseProperties `json:"properties,omitempty"`
3462	// ID - READ-ONLY; The unique resource identifier of the database account.
3463	ID *string `json:"id,omitempty"`
3464	// Name - READ-ONLY; The name of the database account.
3465	Name *string `json:"name,omitempty"`
3466	// Type - READ-ONLY; The type of Azure resource.
3467	Type *string `json:"type,omitempty"`
3468	// Location - The location of the resource group to which the resource belongs.
3469	Location *string            `json:"location,omitempty"`
3470	Tags     map[string]*string `json:"tags"`
3471}
3472
3473// MarshalJSON is the custom marshaler for SQLDatabase.
3474func (sd SQLDatabase) MarshalJSON() ([]byte, error) {
3475	objectMap := make(map[string]interface{})
3476	if sd.SQLDatabaseProperties != nil {
3477		objectMap["properties"] = sd.SQLDatabaseProperties
3478	}
3479	if sd.Location != nil {
3480		objectMap["location"] = sd.Location
3481	}
3482	if sd.Tags != nil {
3483		objectMap["tags"] = sd.Tags
3484	}
3485	return json.Marshal(objectMap)
3486}
3487
3488// UnmarshalJSON is the custom unmarshaler for SQLDatabase struct.
3489func (sd *SQLDatabase) UnmarshalJSON(body []byte) error {
3490	var m map[string]*json.RawMessage
3491	err := json.Unmarshal(body, &m)
3492	if err != nil {
3493		return err
3494	}
3495	for k, v := range m {
3496		switch k {
3497		case "properties":
3498			if v != nil {
3499				var SQLDatabaseProperties SQLDatabaseProperties
3500				err = json.Unmarshal(*v, &SQLDatabaseProperties)
3501				if err != nil {
3502					return err
3503				}
3504				sd.SQLDatabaseProperties = &SQLDatabaseProperties
3505			}
3506		case "id":
3507			if v != nil {
3508				var ID string
3509				err = json.Unmarshal(*v, &ID)
3510				if err != nil {
3511					return err
3512				}
3513				sd.ID = &ID
3514			}
3515		case "name":
3516			if v != nil {
3517				var name string
3518				err = json.Unmarshal(*v, &name)
3519				if err != nil {
3520					return err
3521				}
3522				sd.Name = &name
3523			}
3524		case "type":
3525			if v != nil {
3526				var typeVar string
3527				err = json.Unmarshal(*v, &typeVar)
3528				if err != nil {
3529					return err
3530				}
3531				sd.Type = &typeVar
3532			}
3533		case "location":
3534			if v != nil {
3535				var location string
3536				err = json.Unmarshal(*v, &location)
3537				if err != nil {
3538					return err
3539				}
3540				sd.Location = &location
3541			}
3542		case "tags":
3543			if v != nil {
3544				var tags map[string]*string
3545				err = json.Unmarshal(*v, &tags)
3546				if err != nil {
3547					return err
3548				}
3549				sd.Tags = tags
3550			}
3551		}
3552	}
3553
3554	return nil
3555}
3556
3557// SQLDatabaseCreateUpdateParameters parameters to create and update Cosmos DB SQL database.
3558type SQLDatabaseCreateUpdateParameters struct {
3559	// SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
3560	*SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"`
3561}
3562
3563// MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateParameters.
3564func (sdcup SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) {
3565	objectMap := make(map[string]interface{})
3566	if sdcup.SQLDatabaseCreateUpdateProperties != nil {
3567		objectMap["properties"] = sdcup.SQLDatabaseCreateUpdateProperties
3568	}
3569	return json.Marshal(objectMap)
3570}
3571
3572// UnmarshalJSON is the custom unmarshaler for SQLDatabaseCreateUpdateParameters struct.
3573func (sdcup *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error {
3574	var m map[string]*json.RawMessage
3575	err := json.Unmarshal(body, &m)
3576	if err != nil {
3577		return err
3578	}
3579	for k, v := range m {
3580		switch k {
3581		case "properties":
3582			if v != nil {
3583				var SQLDatabaseCreateUpdateProperties SQLDatabaseCreateUpdateProperties
3584				err = json.Unmarshal(*v, &SQLDatabaseCreateUpdateProperties)
3585				if err != nil {
3586					return err
3587				}
3588				sdcup.SQLDatabaseCreateUpdateProperties = &SQLDatabaseCreateUpdateProperties
3589			}
3590		}
3591	}
3592
3593	return nil
3594}
3595
3596// SQLDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB SQL database.
3597type SQLDatabaseCreateUpdateProperties struct {
3598	// Resource - The standard JSON format of a SQL database
3599	Resource *SQLDatabaseResource `json:"resource,omitempty"`
3600	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
3601	Options map[string]*string `json:"options"`
3602}
3603
3604// MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateProperties.
3605func (sdcup SQLDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) {
3606	objectMap := make(map[string]interface{})
3607	if sdcup.Resource != nil {
3608		objectMap["resource"] = sdcup.Resource
3609	}
3610	if sdcup.Options != nil {
3611		objectMap["options"] = sdcup.Options
3612	}
3613	return json.Marshal(objectMap)
3614}
3615
3616// SQLDatabaseListResult the List operation response, that contains the SQL databases and their properties.
3617type SQLDatabaseListResult struct {
3618	autorest.Response `json:"-"`
3619	// Value - READ-ONLY; List of SQL databases and their properties.
3620	Value *[]SQLDatabase `json:"value,omitempty"`
3621}
3622
3623// SQLDatabaseProperties the properties of an Azure Cosmos DB SQL database
3624type SQLDatabaseProperties struct {
3625	// ID - Name of the Cosmos DB SQL database
3626	ID *string `json:"id,omitempty"`
3627	// Rid - A system generated property. A unique identifier.
3628	Rid *string `json:"_rid,omitempty"`
3629	// Ts - A system generated property that denotes the last updated timestamp of the resource.
3630	Ts interface{} `json:"_ts,omitempty"`
3631	// Etag - A system generated property representing the resource etag required for optimistic concurrency control.
3632	Etag *string `json:"_etag,omitempty"`
3633	// Colls - A system generated property that specified the addressable path of the collections resource.
3634	Colls *string `json:"_colls,omitempty"`
3635	// Users - A system generated property that specifies the addressable path of the users resource.
3636	Users *string `json:"_users,omitempty"`
3637}
3638
3639// SQLDatabaseResource cosmos DB SQL database id object
3640type SQLDatabaseResource struct {
3641	// ID - Name of the Cosmos DB SQL database
3642	ID *string `json:"id,omitempty"`
3643}
3644
3645// Table an Azure Cosmos DB Table.
3646type Table struct {
3647	autorest.Response `json:"-"`
3648	// TableProperties - The properties of an Azure Cosmos DB Table
3649	*TableProperties `json:"properties,omitempty"`
3650	// ID - READ-ONLY; The unique resource identifier of the database account.
3651	ID *string `json:"id,omitempty"`
3652	// Name - READ-ONLY; The name of the database account.
3653	Name *string `json:"name,omitempty"`
3654	// Type - READ-ONLY; The type of Azure resource.
3655	Type *string `json:"type,omitempty"`
3656	// Location - The location of the resource group to which the resource belongs.
3657	Location *string            `json:"location,omitempty"`
3658	Tags     map[string]*string `json:"tags"`
3659}
3660
3661// MarshalJSON is the custom marshaler for Table.
3662func (t Table) MarshalJSON() ([]byte, error) {
3663	objectMap := make(map[string]interface{})
3664	if t.TableProperties != nil {
3665		objectMap["properties"] = t.TableProperties
3666	}
3667	if t.Location != nil {
3668		objectMap["location"] = t.Location
3669	}
3670	if t.Tags != nil {
3671		objectMap["tags"] = t.Tags
3672	}
3673	return json.Marshal(objectMap)
3674}
3675
3676// UnmarshalJSON is the custom unmarshaler for Table struct.
3677func (t *Table) UnmarshalJSON(body []byte) error {
3678	var m map[string]*json.RawMessage
3679	err := json.Unmarshal(body, &m)
3680	if err != nil {
3681		return err
3682	}
3683	for k, v := range m {
3684		switch k {
3685		case "properties":
3686			if v != nil {
3687				var tableProperties TableProperties
3688				err = json.Unmarshal(*v, &tableProperties)
3689				if err != nil {
3690					return err
3691				}
3692				t.TableProperties = &tableProperties
3693			}
3694		case "id":
3695			if v != nil {
3696				var ID string
3697				err = json.Unmarshal(*v, &ID)
3698				if err != nil {
3699					return err
3700				}
3701				t.ID = &ID
3702			}
3703		case "name":
3704			if v != nil {
3705				var name string
3706				err = json.Unmarshal(*v, &name)
3707				if err != nil {
3708					return err
3709				}
3710				t.Name = &name
3711			}
3712		case "type":
3713			if v != nil {
3714				var typeVar string
3715				err = json.Unmarshal(*v, &typeVar)
3716				if err != nil {
3717					return err
3718				}
3719				t.Type = &typeVar
3720			}
3721		case "location":
3722			if v != nil {
3723				var location string
3724				err = json.Unmarshal(*v, &location)
3725				if err != nil {
3726					return err
3727				}
3728				t.Location = &location
3729			}
3730		case "tags":
3731			if v != nil {
3732				var tags map[string]*string
3733				err = json.Unmarshal(*v, &tags)
3734				if err != nil {
3735					return err
3736				}
3737				t.Tags = tags
3738			}
3739		}
3740	}
3741
3742	return nil
3743}
3744
3745// TableCreateUpdateParameters parameters to create and update Cosmos DB Table.
3746type TableCreateUpdateParameters struct {
3747	// TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
3748	*TableCreateUpdateProperties `json:"properties,omitempty"`
3749}
3750
3751// MarshalJSON is the custom marshaler for TableCreateUpdateParameters.
3752func (tcup TableCreateUpdateParameters) MarshalJSON() ([]byte, error) {
3753	objectMap := make(map[string]interface{})
3754	if tcup.TableCreateUpdateProperties != nil {
3755		objectMap["properties"] = tcup.TableCreateUpdateProperties
3756	}
3757	return json.Marshal(objectMap)
3758}
3759
3760// UnmarshalJSON is the custom unmarshaler for TableCreateUpdateParameters struct.
3761func (tcup *TableCreateUpdateParameters) UnmarshalJSON(body []byte) error {
3762	var m map[string]*json.RawMessage
3763	err := json.Unmarshal(body, &m)
3764	if err != nil {
3765		return err
3766	}
3767	for k, v := range m {
3768		switch k {
3769		case "properties":
3770			if v != nil {
3771				var tableCreateUpdateProperties TableCreateUpdateProperties
3772				err = json.Unmarshal(*v, &tableCreateUpdateProperties)
3773				if err != nil {
3774					return err
3775				}
3776				tcup.TableCreateUpdateProperties = &tableCreateUpdateProperties
3777			}
3778		}
3779	}
3780
3781	return nil
3782}
3783
3784// TableCreateUpdateProperties properties to create and update Azure Cosmos DB Table.
3785type TableCreateUpdateProperties struct {
3786	// Resource - The standard JSON format of a Table
3787	Resource *TableResource `json:"resource,omitempty"`
3788	// Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
3789	Options map[string]*string `json:"options"`
3790}
3791
3792// MarshalJSON is the custom marshaler for TableCreateUpdateProperties.
3793func (tcup TableCreateUpdateProperties) MarshalJSON() ([]byte, error) {
3794	objectMap := make(map[string]interface{})
3795	if tcup.Resource != nil {
3796		objectMap["resource"] = tcup.Resource
3797	}
3798	if tcup.Options != nil {
3799		objectMap["options"] = tcup.Options
3800	}
3801	return json.Marshal(objectMap)
3802}
3803
3804// TableListResult the List operation response, that contains the Table and their properties.
3805type TableListResult struct {
3806	autorest.Response `json:"-"`
3807	// Value - READ-ONLY; List of Table and their properties.
3808	Value *[]Table `json:"value,omitempty"`
3809}
3810
3811// TableProperties the properties of an Azure Cosmos Table
3812type TableProperties struct {
3813	// ID - Name of the Cosmos DB table
3814	ID *string `json:"id,omitempty"`
3815}
3816
3817// TableResource cosmos DB table id object
3818type TableResource struct {
3819	// ID - Name of the Cosmos DB table
3820	ID *string `json:"id,omitempty"`
3821}
3822
3823// Throughput an Azure Cosmos DB resource throughput.
3824type Throughput struct {
3825	autorest.Response `json:"-"`
3826	// ThroughputProperties - The properties of an Azure Cosmos DB resource throughput
3827	*ThroughputProperties `json:"properties,omitempty"`
3828	// ID - READ-ONLY; The unique resource identifier of the database account.
3829	ID *string `json:"id,omitempty"`
3830	// Name - READ-ONLY; The name of the database account.
3831	Name *string `json:"name,omitempty"`
3832	// Type - READ-ONLY; The type of Azure resource.
3833	Type *string `json:"type,omitempty"`
3834	// Location - The location of the resource group to which the resource belongs.
3835	Location *string            `json:"location,omitempty"`
3836	Tags     map[string]*string `json:"tags"`
3837}
3838
3839// MarshalJSON is the custom marshaler for Throughput.
3840func (t Throughput) MarshalJSON() ([]byte, error) {
3841	objectMap := make(map[string]interface{})
3842	if t.ThroughputProperties != nil {
3843		objectMap["properties"] = t.ThroughputProperties
3844	}
3845	if t.Location != nil {
3846		objectMap["location"] = t.Location
3847	}
3848	if t.Tags != nil {
3849		objectMap["tags"] = t.Tags
3850	}
3851	return json.Marshal(objectMap)
3852}
3853
3854// UnmarshalJSON is the custom unmarshaler for Throughput struct.
3855func (t *Throughput) UnmarshalJSON(body []byte) error {
3856	var m map[string]*json.RawMessage
3857	err := json.Unmarshal(body, &m)
3858	if err != nil {
3859		return err
3860	}
3861	for k, v := range m {
3862		switch k {
3863		case "properties":
3864			if v != nil {
3865				var throughputProperties ThroughputProperties
3866				err = json.Unmarshal(*v, &throughputProperties)
3867				if err != nil {
3868					return err
3869				}
3870				t.ThroughputProperties = &throughputProperties
3871			}
3872		case "id":
3873			if v != nil {
3874				var ID string
3875				err = json.Unmarshal(*v, &ID)
3876				if err != nil {
3877					return err
3878				}
3879				t.ID = &ID
3880			}
3881		case "name":
3882			if v != nil {
3883				var name string
3884				err = json.Unmarshal(*v, &name)
3885				if err != nil {
3886					return err
3887				}
3888				t.Name = &name
3889			}
3890		case "type":
3891			if v != nil {
3892				var typeVar string
3893				err = json.Unmarshal(*v, &typeVar)
3894				if err != nil {
3895					return err
3896				}
3897				t.Type = &typeVar
3898			}
3899		case "location":
3900			if v != nil {
3901				var location string
3902				err = json.Unmarshal(*v, &location)
3903				if err != nil {
3904					return err
3905				}
3906				t.Location = &location
3907			}
3908		case "tags":
3909			if v != nil {
3910				var tags map[string]*string
3911				err = json.Unmarshal(*v, &tags)
3912				if err != nil {
3913					return err
3914				}
3915				t.Tags = tags
3916			}
3917		}
3918	}
3919
3920	return nil
3921}
3922
3923// ThroughputProperties the properties of an Azure Cosmos DB resource throughput
3924type ThroughputProperties struct {
3925	// Throughput - Value of the Cosmos DB resource throughput
3926	Throughput *int32 `json:"throughput,omitempty"`
3927}
3928
3929// ThroughputResource cosmos DB resource throughput object
3930type ThroughputResource struct {
3931	// Throughput - Value of the Cosmos DB resource throughput
3932	Throughput *int32 `json:"throughput,omitempty"`
3933}
3934
3935// ThroughputUpdateParameters parameters to update Cosmos DB resource throughput.
3936type ThroughputUpdateParameters struct {
3937	// ThroughputUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
3938	*ThroughputUpdateProperties `json:"properties,omitempty"`
3939}
3940
3941// MarshalJSON is the custom marshaler for ThroughputUpdateParameters.
3942func (tup ThroughputUpdateParameters) MarshalJSON() ([]byte, error) {
3943	objectMap := make(map[string]interface{})
3944	if tup.ThroughputUpdateProperties != nil {
3945		objectMap["properties"] = tup.ThroughputUpdateProperties
3946	}
3947	return json.Marshal(objectMap)
3948}
3949
3950// UnmarshalJSON is the custom unmarshaler for ThroughputUpdateParameters struct.
3951func (tup *ThroughputUpdateParameters) UnmarshalJSON(body []byte) error {
3952	var m map[string]*json.RawMessage
3953	err := json.Unmarshal(body, &m)
3954	if err != nil {
3955		return err
3956	}
3957	for k, v := range m {
3958		switch k {
3959		case "properties":
3960			if v != nil {
3961				var throughputUpdateProperties ThroughputUpdateProperties
3962				err = json.Unmarshal(*v, &throughputUpdateProperties)
3963				if err != nil {
3964					return err
3965				}
3966				tup.ThroughputUpdateProperties = &throughputUpdateProperties
3967			}
3968		}
3969	}
3970
3971	return nil
3972}
3973
3974// ThroughputUpdateProperties properties to update Azure Cosmos DB resource throughput.
3975type ThroughputUpdateProperties struct {
3976	// Resource - The standard JSON format of a resource throughput
3977	Resource *ThroughputResource `json:"resource,omitempty"`
3978}
3979
3980// UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the
3981// Azure Cosmos DB service.
3982type UniqueKey struct {
3983	// Paths - List of paths must be unique for each document in the Azure Cosmos DB service
3984	Paths *[]string `json:"paths,omitempty"`
3985}
3986
3987// UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents
3988// in the collection in the Azure Cosmos DB service.
3989type UniqueKeyPolicy struct {
3990	// UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
3991	UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"`
3992}
3993
3994// Usage the usage data for a usage request.
3995type Usage struct {
3996	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
3997	Unit UnitType `json:"unit,omitempty"`
3998	// Name - READ-ONLY; The name information for the metric.
3999	Name *MetricName `json:"name,omitempty"`
4000	// QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values.
4001	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
4002	// Limit - READ-ONLY; Maximum value for this metric
4003	Limit *int64 `json:"limit,omitempty"`
4004	// CurrentValue - READ-ONLY; Current value for this metric
4005	CurrentValue *int64 `json:"currentValue,omitempty"`
4006}
4007
4008// UsagesResult the response to a list usage request.
4009type UsagesResult struct {
4010	autorest.Response `json:"-"`
4011	// Value - READ-ONLY; The list of usages for the database. A usage is a point in time metric
4012	Value *[]Usage `json:"value,omitempty"`
4013}
4014
4015// VirtualNetworkRule virtual Network ACL Rule object
4016type VirtualNetworkRule struct {
4017	// ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
4018	ID *string `json:"id,omitempty"`
4019	// IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
4020	IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
4021}
4022