DocumentDbOutputDataSource Class

public final class DocumentDbOutputDataSource
extends OutputDataSource

Describes a DocumentDB output data source.

Constructor Summary

Constructor Description
DocumentDbOutputDataSource()

Creates an instance of DocumentDbOutputDataSource class.

Method Summary

Modifier and Type Method and Description
String accountId()

Get the accountId property: The DocumentDB account name or ID.

String accountKey()

Get the accountKey property: The account key for the DocumentDB account.

String collectionNamePattern()

Get the collectionNamePattern property: The collection name pattern for the collections to be used.

String database()

Get the database property: The name of the DocumentDB database.

String documentId()

Get the documentId property: The name of the field in output events used to specify the primary key which insert or update operations are based on.

static DocumentDbOutputDataSource fromJson(JsonReader jsonReader)

Reads an instance of DocumentDbOutputDataSource from the JsonReader.

String partitionKey()

Get the partitionKey property: The name of the field in output events used to specify the key for partitioning output across collections.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Indicates the type of data source output will be written to.

void validate()

Validates the instance.

DocumentDbOutputDataSource withAccountId(String accountId)

Set the accountId property: The DocumentDB account name or ID.

DocumentDbOutputDataSource withAccountKey(String accountKey)

Set the accountKey property: The account key for the DocumentDB account.

DocumentDbOutputDataSource withCollectionNamePattern(String collectionNamePattern)

Set the collectionNamePattern property: The collection name pattern for the collections to be used.

DocumentDbOutputDataSource withDatabase(String database)

Set the database property: The name of the DocumentDB database.

DocumentDbOutputDataSource withDocumentId(String documentId)

Set the documentId property: The name of the field in output events used to specify the primary key which insert or update operations are based on.

DocumentDbOutputDataSource withPartitionKey(String partitionKey)

Set the partitionKey property: The name of the field in output events used to specify the key for partitioning output across collections.

Methods inherited from OutputDataSource

Methods inherited from java.lang.Object

Constructor Details

DocumentDbOutputDataSource

public DocumentDbOutputDataSource()

Creates an instance of DocumentDbOutputDataSource class.

Method Details

accountId

public String accountId()

Get the accountId property: The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.

Returns:

the accountId value.

accountKey

public String accountKey()

Get the accountKey property: The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.

Returns:

the accountKey value.

collectionNamePattern

public String collectionNamePattern()

Get the collectionNamePattern property: The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.

Returns:

the collectionNamePattern value.

database

public String database()

Get the database property: The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.

Returns:

the database value.

documentId

public String documentId()

Get the documentId property: The name of the field in output events used to specify the primary key which insert or update operations are based on.

Returns:

the documentId value.

fromJson

public static DocumentDbOutputDataSource fromJson(JsonReader jsonReader)

Reads an instance of DocumentDbOutputDataSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DocumentDbOutputDataSource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the DocumentDbOutputDataSource.

partitionKey

public String partitionKey()

Get the partitionKey property: The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.

Returns:

the partitionKey value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

DocumentDbOutputDataSource.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests.

Overrides:

DocumentDbOutputDataSource.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

DocumentDbOutputDataSource.validate()

withAccountId

public DocumentDbOutputDataSource withAccountId(String accountId)

Set the accountId property: The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.

Parameters:

accountId - the accountId value to set.

Returns:

the DocumentDbOutputDataSource object itself.

withAccountKey

public DocumentDbOutputDataSource withAccountKey(String accountKey)

Set the accountKey property: The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.

Parameters:

accountKey - the accountKey value to set.

Returns:

the DocumentDbOutputDataSource object itself.

withCollectionNamePattern

public DocumentDbOutputDataSource withCollectionNamePattern(String collectionNamePattern)

Set the collectionNamePattern property: The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.

Parameters:

collectionNamePattern - the collectionNamePattern value to set.

Returns:

the DocumentDbOutputDataSource object itself.

withDatabase

public DocumentDbOutputDataSource withDatabase(String database)

Set the database property: The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.

Parameters:

database - the database value to set.

Returns:

the DocumentDbOutputDataSource object itself.

withDocumentId

public DocumentDbOutputDataSource withDocumentId(String documentId)

Set the documentId property: The name of the field in output events used to specify the primary key which insert or update operations are based on.

Parameters:

documentId - the documentId value to set.

Returns:

the DocumentDbOutputDataSource object itself.

withPartitionKey

public DocumentDbOutputDataSource withPartitionKey(String partitionKey)

Set the partitionKey property: The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.

Parameters:

partitionKey - the partitionKey value to set.

Returns:

the DocumentDbOutputDataSource object itself.

Applies to