Skip to content

Commit

Permalink
Suite0 fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
adityasa committed Apr 5, 2023
1 parent 22258dc commit a572d7f
Showing 1 changed file with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public class ContainerProperties
[JsonProperty(PropertyName = "clientEncryptionPolicy", NullValueHandling = NullValueHandling.Ignore)]
private ClientEncryptionPolicy clientEncryptionPolicyInternal;

[JsonProperty(PropertyName = "computedProperties", NullValueHandling = NullValueHandling.Ignore)]
private Collection<ComputedProperty> computedProperties;

/// <summary>
/// This contains additional values for scenarios where the SDK is not aware of new fields.
/// This ensures that if resource is read and updated none of the fields will be lost in the process.
Expand Down Expand Up @@ -292,13 +295,34 @@ public IndexingPolicy IndexingPolicy
/// <value>
/// The collection containing <see cref="ComputedProperty"/> objects associated with the container.
/// </value>
[JsonProperty(PropertyName = "computedProperties", NullValueHandling = NullValueHandling.Ignore)]
[JsonIgnore]
#if PREVIEW
public
#else
internal
#endif
Collection<ComputedProperty> ComputedProperties { get; set; } = new Collection<ComputedProperty>();
Collection<ComputedProperty> ComputedProperties
{
get
{
if (this.computedProperties == null)
{
this.computedProperties = new Collection<ComputedProperty>();
}

return this.computedProperties;
}

set
{
if (value == null)
{
throw new ArgumentException($"{nameof(value)}");
}

this.computedProperties = value;
}
}

/// <summary>
/// Gets the <see cref="ChangeFeedPolicy"/> associated with the container from the Azure Cosmos DB service.
Expand Down

0 comments on commit a572d7f

Please sign in to comment.