Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <vachshah@amazon.com>
  • Loading branch information
VachaShah committed May 6, 2024
1 parent a65cde7 commit b5c2d72
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class CompositeDateHistogramAggregationSource extends CompositeValuesSour
@Nullable
private final Time fixedInterval;

private final long offset;
@Nullable
private final Long offset;

private final String zoneId;

Expand Down Expand Up @@ -59,9 +60,10 @@ public final Time fixedInterval() {
}

/**
* Required - API name: {@code offset}
* API name: {@code offset}
*/
public final long offset() {
@Nullable
public final Long offset() {
return this.offset;

}
Expand Down Expand Up @@ -95,8 +97,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
this.fixedInterval.serialize(generator, mapper);

}
generator.writeKey("offset");
generator.write(this.offset);
if (this.offset != null) {
generator.writeKey("offset");
generator.write(this.offset);

}

generator.writeKey("zone_id");
generator.write(this.zoneId);
Expand All @@ -116,7 +121,8 @@ public static class Builder extends CompositeValuesSource.AbstractBuilder<Builde
@Nullable
private Time fixedInterval;

private long offset;
@Nullable
private Long offset;

private String zoneId;

Expand All @@ -137,9 +143,9 @@ public final Builder fixedInterval(@Nullable Time value) {
}

/**
* Required - API name: {@code offset}
* API name: {@code offset}
*/
public final Builder offset(long value) {
public final Builder offset(Long value) {
this.offset = value;
return this;
}
Expand Down

0 comments on commit b5c2d72

Please sign in to comment.