Skip to content

Commit 51166fb

Browse files
stevejgordongithub-actions[bot]
authored andcommitted
Regen index setting blocks based on fixed spec (#7718)
1 parent da72955 commit 51166fb

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs

+13-9
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ public sealed partial class IndexSettingBlocks
3333
[JsonConverter(typeof(StringifiedBoolConverter))]
3434
public bool? Metadata { get; set; }
3535
[JsonInclude, JsonPropertyName("read")]
36+
[JsonConverter(typeof(StringifiedBoolConverter))]
3637
public bool? Read { get; set; }
3738
[JsonInclude, JsonPropertyName("read_only")]
39+
[JsonConverter(typeof(StringifiedBoolConverter))]
3840
public bool? ReadOnly { get; set; }
3941
[JsonInclude, JsonPropertyName("read_only_allow_delete")]
42+
[JsonConverter(typeof(StringifiedBoolConverter))]
4043
public bool? ReadOnlyAllowDelete { get; set; }
4144
[JsonInclude, JsonPropertyName("write")]
42-
public Union<bool?, string?>? Write { get; set; }
45+
[JsonConverter(typeof(StringifiedBoolConverter))]
46+
public bool? Write { get; set; }
4347
}
4448

4549
public sealed partial class IndexSettingBlocksDescriptor : SerializableDescriptor<IndexSettingBlocksDescriptor>
@@ -54,7 +58,7 @@ public IndexSettingBlocksDescriptor() : base()
5458
private bool? ReadValue { get; set; }
5559
private bool? ReadOnlyValue { get; set; }
5660
private bool? ReadOnlyAllowDeleteValue { get; set; }
57-
private Union<bool?, string?>? WriteValue { get; set; }
61+
private bool? WriteValue { get; set; }
5862

5963
public IndexSettingBlocksDescriptor Metadata(bool? metadata = true)
6064
{
@@ -80,7 +84,7 @@ public IndexSettingBlocksDescriptor ReadOnlyAllowDelete(bool? readOnlyAllowDelet
8084
return Self;
8185
}
8286

83-
public IndexSettingBlocksDescriptor Write(Union<bool?, string?>? write)
87+
public IndexSettingBlocksDescriptor Write(bool? write = true)
8488
{
8589
WriteValue = write;
8690
return Self;
@@ -95,22 +99,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
9599
JsonSerializer.Serialize(writer, MetadataValue, options);
96100
}
97101

98-
if (ReadValue.HasValue)
102+
if (ReadValue is not null)
99103
{
100104
writer.WritePropertyName("read");
101-
writer.WriteBooleanValue(ReadValue.Value);
105+
JsonSerializer.Serialize(writer, ReadValue, options);
102106
}
103107

104-
if (ReadOnlyValue.HasValue)
108+
if (ReadOnlyValue is not null)
105109
{
106110
writer.WritePropertyName("read_only");
107-
writer.WriteBooleanValue(ReadOnlyValue.Value);
111+
JsonSerializer.Serialize(writer, ReadOnlyValue, options);
108112
}
109113

110-
if (ReadOnlyAllowDeleteValue.HasValue)
114+
if (ReadOnlyAllowDeleteValue is not null)
111115
{
112116
writer.WritePropertyName("read_only_allow_delete");
113-
writer.WriteBooleanValue(ReadOnlyAllowDeleteValue.Value);
117+
JsonSerializer.Serialize(writer, ReadOnlyAllowDeleteValue, options);
114118
}
115119

116120
if (WriteValue is not null)

0 commit comments

Comments
 (0)