Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
extended_bounds
and hard_bounds
for `{Date}HistogramAgg…
…regation` (#8140)
- Loading branch information
Showing
8 changed files
with
1,148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
...ic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsDate.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// Licensed to Elasticsearch B.V under one or more agreements. | ||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
// See the LICENSE file in the project root for more information. | ||
// | ||
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ | ||
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ | ||
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ | ||
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ | ||
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ | ||
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ | ||
// ------------------------------------------------ | ||
// | ||
// This file is automatically generated. | ||
// Please do not edit these files manually. | ||
// | ||
// ------------------------------------------------ | ||
|
||
#nullable restore | ||
|
||
using Elastic.Clients.Elasticsearch.Serverless.Fluent; | ||
using Elastic.Clients.Elasticsearch.Serverless.Serialization; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq.Expressions; | ||
using System.Text.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; | ||
|
||
public sealed partial class ExtendedBoundsDate | ||
{ | ||
/// <summary> | ||
/// <para>Maximum value for the bound.</para> | ||
/// </summary> | ||
[JsonInclude, JsonPropertyName("max")] | ||
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? Max { get; set; } | ||
|
||
/// <summary> | ||
/// <para>Minimum value for the bound.</para> | ||
/// </summary> | ||
[JsonInclude, JsonPropertyName("min")] | ||
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? Min { get; set; } | ||
} | ||
|
||
public sealed partial class ExtendedBoundsDateDescriptor : SerializableDescriptor<ExtendedBoundsDateDescriptor> | ||
{ | ||
internal ExtendedBoundsDateDescriptor(Action<ExtendedBoundsDateDescriptor> configure) => configure.Invoke(this); | ||
|
||
public ExtendedBoundsDateDescriptor() : base() | ||
{ | ||
} | ||
|
||
private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? MaxValue { get; set; } | ||
private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? MinValue { get; set; } | ||
|
||
/// <summary> | ||
/// <para>Maximum value for the bound.</para> | ||
/// </summary> | ||
public ExtendedBoundsDateDescriptor Max(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? max) | ||
{ | ||
MaxValue = max; | ||
return Self; | ||
} | ||
|
||
/// <summary> | ||
/// <para>Minimum value for the bound.</para> | ||
/// </summary> | ||
public ExtendedBoundsDateDescriptor Min(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? min) | ||
{ | ||
MinValue = min; | ||
return Self; | ||
} | ||
|
||
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) | ||
{ | ||
writer.WriteStartObject(); | ||
if (MaxValue is not null) | ||
{ | ||
writer.WritePropertyName("max"); | ||
JsonSerializer.Serialize(writer, MaxValue, options); | ||
} | ||
|
||
if (MinValue is not null) | ||
{ | ||
writer.WritePropertyName("min"); | ||
JsonSerializer.Serialize(writer, MinValue, options); | ||
} | ||
|
||
writer.WriteEndObject(); | ||
} | ||
} |
Oops, something went wrong.