Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class CreateFromRequest extends RequestBase implements JsonpSerializable

private final String source;

@Nullable
private final CreateFrom createFrom;

// ---------------------------------------------------------------------------------------------
Expand All @@ -82,7 +83,7 @@ private CreateFromRequest(Builder builder) {

this.dest = ApiTypeHelper.requireNonNull(builder.dest, this, "dest");
this.source = ApiTypeHelper.requireNonNull(builder.source, this, "source");
this.createFrom = ApiTypeHelper.requireNonNull(builder.createFrom, this, "createFrom");
this.createFrom = builder.createFrom;

}

Expand All @@ -109,8 +110,9 @@ public final String source() {
}

/**
* Required - Request body.
* Request body.
*/
@Nullable
public final CreateFrom createFrom() {
return this.createFrom;
}
Expand All @@ -136,6 +138,7 @@ public static class Builder extends RequestBase.AbstractBuilder<Builder>

private String source;

@Nullable
private CreateFrom createFrom;

public Builder() {
Expand Down Expand Up @@ -167,15 +170,15 @@ public final Builder source(String value) {
}

/**
* Required - Request body.
* Request body.
*/
public final Builder createFrom(CreateFrom value) {
public final Builder createFrom(@Nullable CreateFrom value) {
this.createFrom = value;
return this;
}

/**
* Required - Request body.
* Request body.
*/
public final Builder createFrom(Function<CreateFrom.Builder, ObjectBuilder<CreateFrom>> fn) {
return this.createFrom(fn.apply(new CreateFrom.Builder()).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class SimulateIndexTemplateRequest extends RequestBase implements JsonpSe

private final String name;

@Nullable
private final IndexTemplate indexTemplate;

// ---------------------------------------------------------------------------------------------
Expand All @@ -96,7 +97,7 @@ private SimulateIndexTemplateRequest(Builder builder) {
this.includeDefaults = builder.includeDefaults;
this.masterTimeout = builder.masterTimeout;
this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name");
this.indexTemplate = ApiTypeHelper.requireNonNull(builder.indexTemplate, this, "indexTemplate");
this.indexTemplate = builder.indexTemplate;

}

Expand Down Expand Up @@ -157,8 +158,9 @@ public final String name() {
}

/**
* Required - Request body.
* Request body.
*/
@Nullable
public final IndexTemplate indexTemplate() {
return this.indexTemplate;
}
Expand Down Expand Up @@ -194,6 +196,7 @@ public static class Builder extends RequestBase.AbstractBuilder<Builder>

private String name;

@Nullable
private IndexTemplate indexTemplate;

public Builder() {
Expand Down Expand Up @@ -271,15 +274,15 @@ public final Builder name(String value) {
}

/**
* Required - Request body.
* Request body.
*/
public final Builder indexTemplate(IndexTemplate value) {
public final Builder indexTemplate(@Nullable IndexTemplate value) {
this.indexTemplate = value;
return this;
}

/**
* Required - Request body.
* Request body.
*/
public final Builder indexTemplate(Function<IndexTemplate.Builder, ObjectBuilder<IndexTemplate>> fn) {
return this.indexTemplate(fn.apply(new IndexTemplate.Builder()).build());
Expand Down
Loading