Skip to content

Commit fbe12ea

Browse files
authored
[AppConfiguration] Update snapshot CompositionType enum values (Azure#36221)
* [AppConfiguration] Update snapshot CompositionType enum values
1 parent b3eaee8 commit fbe12ea

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ namespace Azure.Data.AppConfiguration
66
private readonly object _dummy;
77
private readonly int _dummyPrimitive;
88
public CompositionType(string value) { throw null; }
9-
public static Azure.Data.AppConfiguration.CompositionType All { get { throw null; } }
10-
public static Azure.Data.AppConfiguration.CompositionType GroupByKey { get { throw null; } }
9+
public static Azure.Data.AppConfiguration.CompositionType Key { get { throw null; } }
10+
public static Azure.Data.AppConfiguration.CompositionType KeyLabel { get { throw null; } }
1111
public bool Equals(Azure.Data.AppConfiguration.CompositionType other) { throw null; }
1212
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1313
public override bool Equals(object obj) { throw null; }

sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/CompositionType.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Azure.Data.AppConfiguration
88
{
9-
/// <summary> The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The &apos;group_by_key&apos; composition type ensures there are no two key-values containing the same key. </summary>
9+
/// <summary> The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. </summary>
1010
public readonly partial struct CompositionType : IEquatable<CompositionType>
1111
{
1212
private readonly string _value;
@@ -18,13 +18,13 @@ public CompositionType(string value)
1818
_value = value ?? throw new ArgumentNullException(nameof(value));
1919
}
2020

21-
private const string AllValue = "all";
22-
private const string GroupByKeyValue = "group_by_key";
21+
private const string KeyValue = "key";
22+
private const string KeyLabelValue = "key_label";
2323

24-
/// <summary> all. </summary>
25-
public static CompositionType All { get; } = new CompositionType(AllValue);
26-
/// <summary> group_by_key. </summary>
27-
public static CompositionType GroupByKey { get; } = new CompositionType(GroupByKeyValue);
24+
/// <summary> The 'key' composition type ensures there are no two key-values containing the same key. </summary>
25+
public static CompositionType Key { get; } = new CompositionType(KeyValue);
26+
/// <summary> The 'key_label' composition type ensures there are no two key-values containing the same key and label. </summary>
27+
public static CompositionType KeyLabel { get; } = new CompositionType(KeyLabelValue);
2828
/// <summary> Determines if two <see cref="CompositionType"/> values are the same. </summary>
2929
public static bool operator ==(CompositionType left, CompositionType right) => left.Equals(right);
3030
/// <summary> Determines if two <see cref="CompositionType"/> values are not the same. </summary>

sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsSnapshot.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public ConfigurationSettingsSnapshot(IEnumerable<SnapshotSettingFilter> filters)
2727
/// <param name="status"> The current status of the snapshot. </param>
2828
/// <param name="statusCode"> Provides additional information about the status of the snapshot. The status code values are modeled after HTTP status codes. </param>
2929
/// <param name="filters"> A list of filters used to filter the key-values included in the snapshot. </param>
30-
/// <param name="compositionType"> The composition type describes how the key-values within the snapshot are composed. The &apos;all&apos; composition type includes all key-values. The &apos;group_by_key&apos; composition type ensures there are no two key-values containing the same key. </param>
30+
/// <param name="compositionType"> The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. </param>
3131
/// <param name="created"> The time that the snapshot was created. </param>
3232
/// <param name="expires"> The time that the snapshot will expire. </param>
3333
/// <param name="retentionPeriod"> The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. </param>
@@ -59,7 +59,7 @@ internal ConfigurationSettingsSnapshot(string name, SnapshotStatus? status, int?
5959
public int? StatusCode { get; }
6060
/// <summary> A list of filters used to filter the key-values included in the snapshot. </summary>
6161
public IList<SnapshotSettingFilter> Filters { get; }
62-
/// <summary> The composition type describes how the key-values within the snapshot are composed. The &apos;all&apos; composition type includes all key-values. The &apos;group_by_key&apos; composition type ensures there are no two key-values containing the same key. </summary>
62+
/// <summary> The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. </summary>
6363
public CompositionType? CompositionType { get; set; }
6464
/// <summary> The time that the snapshot was created. </summary>
6565
public DateTimeOffset? Created { get; }
@@ -70,7 +70,7 @@ internal ConfigurationSettingsSnapshot(string name, SnapshotStatus? status, int?
7070
public TimeSpan? RetentionPeriod {
7171
get
7272
{
73-
return (_retentionPeriod==null) ? default : TimeSpan.FromSeconds((double)_retentionPeriod);
73+
return _retentionPeriod != null ? TimeSpan.FromSeconds((double)_retentionPeriod) : null;
7474
}
7575
set
7676
{

sdk/appconfiguration/Azure.Data.AppConfiguration/src/autorest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Run `dotnet build /t:GenerateCode` to generate code.
66
> see https://aka.ms/autorest
77
``` yaml
88
input-file:
9-
- https://github.com/Azure/azure-rest-api-specs/blob/855e88fcf04c07753bf822e693e4616c4ea67d90/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json
9+
- https://github.com/Azure/azure-rest-api-specs/blob/2f7a3cbda00c6ae4199940d500e5212b6481d9ea/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json
1010
namespace: Azure.Data.AppConfiguration
1111
title: ConfigurationClient
1212
```

0 commit comments

Comments
 (0)