Skip to content

Commit

Permalink
Documentation: Fixes documentation on ContainerProperties (#2180)
Browse files Browse the repository at this point in the history
Co-authored-by: Gheorghe Bulicanu <[email protected]>
  • Loading branch information
gbulicanu and Gheorghe Bulicanu authored Feb 4, 2021
1 parent 40c608c commit 3e4c37b
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace Microsoft.Azure.Cosmos
using Newtonsoft.Json;

/// <summary>
/// Represents a document container in the Azure Cosmos DB service. A container is a named logical container for documents.
/// Represents a document container in the Azure Cosmos DB service. A container is a named logical container for documents.
/// </summary>
/// <remarks>
/// A database may contain zero or more named containers and each container consists of zero or more JSON documents.
/// Being schema-free, the documents in a container do not need to share the same structure or fields. Since containers are application resources,
/// A database may contain zero or more named containers and each container consists of zero or more JSON documents.
/// Being schema-free, the documents in a container do not need to share the same structure or fields. Since containers are application resources,
/// they can be authorized using either the master key or resource keys.
/// </remarks>
/// <seealso href="https://docs.microsoft.com/azure/cosmos-db/databases-containers-items"/>
Expand All @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Cosmos
/// The partition key is the first level 'country' property in all the documents within this container.
/// <code language="c#">
/// <![CDATA[
/// Container container = await client.GetDatabase("dbName"].Containers.CreateAsync("MyCollection", "/country", 50000} );
/// Container container = await client.GetDatabase("dbName").Containers.CreateAsync("MyCollection", "/country", 50000} );
/// ContainerProperties containerProperties = container.Resource;
/// ]]>
/// </code>
Expand All @@ -37,8 +37,8 @@ namespace Microsoft.Azure.Cosmos
/// ContainerProperties containerProperties = new ContainerProperties("MyCollection", "/country");
/// containerProperties.IndexingPolicy.Automatic = true;
/// containerProperties.IndexingPolicy.IndexingMode = IndexingMode.Consistent;
///
/// CosmosContainerResponse containerCreateResponse = await client.GetDatabase("dbName"].CreateContainerAsync(containerProperties, 50000);
///
/// CosmosContainerResponse containerCreateResponse = await client.GetDatabase("dbName").CreateContainerAsync(containerProperties, 50000);
/// ContainerProperties createdContainerProperties = containerCreateResponse.Container;
/// ]]>
/// </code>
Expand All @@ -47,7 +47,7 @@ namespace Microsoft.Azure.Cosmos
/// The example below deletes this container.
/// <code language="c#">
/// <![CDATA[
/// Container container = client.GetDatabase("dbName"].Containers["MyCollection"];
/// Container container = client.GetDatabase("dbName").Containers["MyCollection"];
/// await container.DeleteAsync();
/// ]]>
/// </code>
Expand Down Expand Up @@ -122,7 +122,7 @@ public ContainerProperties(string id, IReadOnlyList<string> partitionKeyPaths)
/// The partition key definition version 1 uses a hash function that computes
/// hash based on the first 100 bytes of the partition key. This can cause
/// conflicts for documents with partition keys greater than 100 bytes.
///
///
/// The partition key definition version 2 uses a hash function that computes
/// hash based on the first 2 KB of the partition key.
/// </summary>
Expand Down Expand Up @@ -168,15 +168,15 @@ public ConflictResolutionPolicy ConflictResolutionPolicy
/// <value>The Id associated with the resource.</value>
/// <remarks>
/// <para>
/// Every resource within an Azure Cosmos DB database account needs to have a unique identifier.
/// Every resource within an Azure Cosmos DB database account needs to have a unique identifier.
/// Unlike <see cref="Documents.Resource.ResourceId"/>, which is set internally, this Id is settable by the user and is not immutable.
/// </para>
/// <para>
/// When working with document resources, they too have this settable Id property.
/// When working with document resources, they too have this settable Id property.
/// If an Id is not supplied by the user the SDK will automatically generate a new GUID and assign its value to this property before
/// persisting the document in the database.
/// persisting the document in the database.
/// You can override this auto Id generation by setting the disableAutomaticIdGeneration parameter on the <see cref="Microsoft.Azure.Cosmos.DocumentClient"/> instance to true.
/// This will prevent the SDK from generating new Ids.
/// This will prevent the SDK from generating new Ids.
/// </para>
/// <para>
/// The following characters are restricted and cannot be used in the Id property:
Expand Down Expand Up @@ -224,7 +224,7 @@ public UniqueKeyPolicy UniqueKeyPolicy
/// The entity tag associated with the resource.
/// </value>
/// <remarks>
/// ETags are used for concurrency checking when updating resources.
/// ETags are used for concurrency checking when updating resources.
/// </remarks>
[JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)]
public string ETag { get; private set; }
Expand All @@ -251,7 +251,7 @@ public UniqueKeyPolicy UniqueKeyPolicy
/// </remarks>
[JsonIgnore]
#if PREVIEW
public
public
#else
internal
#endif
Expand All @@ -263,7 +263,7 @@ ClientEncryptionPolicy ClientEncryptionPolicy
}

/// <summary>
/// Gets the <see cref="IndexingPolicy"/> associated with the container from the Azure Cosmos DB service.
/// Gets the <see cref="IndexingPolicy"/> associated with the container from the Azure Cosmos DB service.
/// </summary>
/// <value>
/// The indexing policy associated with the container.
Expand Down Expand Up @@ -293,7 +293,7 @@ public IndexingPolicy IndexingPolicy
}

/// <summary>
/// Gets the <see cref="ChangeFeedPolicy"/> associated with the container from the Azure Cosmos DB service.
/// Gets the <see cref="ChangeFeedPolicy"/> associated with the container from the Azure Cosmos DB service.
/// </summary>
/// <value>
/// The change feed policy associated with the container.
Expand All @@ -319,10 +319,10 @@ ChangeFeedPolicy ChangeFeedPolicy
}

/// <summary>
/// Gets the <see cref="GeospatialConfig"/> associated with the collection from the Azure Cosmos DB service.
/// Gets the <see cref="GeospatialConfig"/> associated with the collection from the Azure Cosmos DB service.
/// </summary>
/// <value>
/// Geospatial type of collection i.e. geography or geometry
/// Geospatial type of collection i.e. geography or geometry
/// </value>
[JsonIgnore]
public GeospatialConfig GeospatialConfig
Expand Down Expand Up @@ -420,10 +420,10 @@ public IReadOnlyList<string> PartitionKeyPaths
/// </summary>
/// <value>
/// It is an optional property.
///
///
/// The unit of measurement is seconds. The maximum allowed value is 2147483647.
/// A valid value must be either a nonzero positive integer, '-1' or <c>null</c>.
///
///
/// By default, DefaultTimeToLive is set to null meaning the time to live is turned off for the container.
/// </value>
/// <remarks>
Expand Down Expand Up @@ -483,10 +483,10 @@ public IReadOnlyList<string> PartitionKeyPaths
/// </summary>
/// <value>
/// It is an optional property.
///
///
/// The unit of measurement is seconds. The maximum allowed value is 2147483647.
/// A valid value must be either a nonzero positive integer, '-1' or <c>null</c>.
///
///
/// By default, AnalyticalStoreTimeToLiveInSeconds is set to null meaning analytical store is turned-off.
/// </value>
/// <remarks>
Expand All @@ -500,11 +500,11 @@ public IReadOnlyList<string> PartitionKeyPaths
/// </para>
/// <para>
/// When the <see cref="AnalyticalStoreTimeToLiveInSeconds"/> is '-1', all the items changes will be captured
/// by analytical store and will never expire.
/// by analytical store and will never expire.
/// </para>
/// <para>
/// When the <see cref="AnalyticalStoreTimeToLiveInSeconds"/> is a nonzero positive integer, all the items
/// changes will be captured by analytical store and expired after the specified time to live.
/// changes will be captured by analytical store and expired after the specified time to live.
/// </para>
/// </remarks>
/// <example>
Expand Down Expand Up @@ -537,7 +537,7 @@ public IReadOnlyList<string> PartitionKeyPaths
/// <summary>
/// Gets the self-link associated with the resource from the Azure Cosmos DB service.
/// </summary>
/// <value>The self-link associated with the resource.</value>
/// <value>The self-link associated with the resource.</value>
/// <remarks>
/// A self-link is a static addressable Uri for each resource within a database account and follows the Azure Cosmos DB resource model.
/// E.g. a self-link for a document could be dbs/db_resourceid/colls/coll_resourceid/documents/doc_resourceid
Expand Down Expand Up @@ -566,7 +566,7 @@ internal PartitionKeyInternal GetNoneValue()
}

/// <summary>
/// Only collection cache needs this contract. None are expected to use it.
/// Only collection cache needs this contract. None are expected to use it.
/// </summary>
/// <param name="resourceId">The resource identifier for the container.</param>
/// <returns>An instance of <see cref="ContainerProperties"/>.</returns>
Expand Down Expand Up @@ -612,7 +612,7 @@ internal ContainerProperties(string id, PartitionKeyDefinition partitionKeyDefin
/// The Resource Id associated with the resource.
/// </value>
/// <remarks>
/// A Resource Id is the unique, immutable, identifier assigned to each Azure Cosmos DB
/// A Resource Id is the unique, immutable, identifier assigned to each Azure Cosmos DB
/// resource whether that is a database, a container or a document.
/// These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account.
/// </remarks>
Expand Down

0 comments on commit 3e4c37b

Please sign in to comment.