Skip to content

Commit

Permalink
[codegen] Update to latest API spec
Browse files Browse the repository at this point in the history
  • Loading branch information
swallez committed Oct 19, 2022
1 parent 56741f9 commit 8e4be9c
Show file tree
Hide file tree
Showing 25 changed files with 1,733 additions and 275 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1426,13 +1426,13 @@
'indices.validate_query.IndicesValidationExplanation': 'indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37',
'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L51',
'indices.validate_query.Response': 'indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30',
'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L89-L93',
'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L95-L103',
'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L122-L126',
'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L128-L134',
'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L146-L151',
'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L136-L144',
'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L153-L162',
'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L90-L94',
'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L96-L104',
'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L123-L127',
'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L129-L135',
'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L147-L152',
'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L137-L145',
'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L154-L162',
'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L164-L177',
'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L179-L185',
'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L187-L192',
Expand All @@ -1441,33 +1441,34 @@
'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L201-L209',
'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L211-L213',
'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L215-L219',
'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L105-L112',
'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L106-L113',
'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L221-L227',
'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L229-L235',
'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L244-L250',
'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L257-L263',
'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L252-L255',
'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L237-L242',
'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L265-L269',
'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L271-L275',
'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L277-L289',
'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L291-L295',
'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L271-L277',
'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L279-L284',
'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L286-L298',
'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L300-L304',
'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L23-L28',
'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L297-L299',
'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L69-L74',
'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L306-L309',
'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L69-L75',
'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L28-L67',
'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L301-L304',
'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L306-L310',
'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L319-L323',
'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L325-L328',
'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L330-L333',
'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L335-L339',
'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L341-L347',
'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L349-L353',
'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L355-L359',
'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L361-L365',
'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L114-L120',
'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L76-L87',
'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L311-L314',
'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L316-L320',
'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L329-L336',
'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L338-L341',
'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L343-L346',
'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L348-L352',
'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L354-L360',
'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L362-L366',
'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L368-L372',
'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L374-L378',
'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L115-L121',
'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L77-L88',
'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L37',
'ingest.delete_pipeline.Response': 'ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24',
'ingest.geo_ip_stats.GeoIpDownloadStatistics': 'ingest/geo_ip_stats/types.ts#L24-L35',
Expand Down Expand Up @@ -2034,26 +2035,30 @@
'searchable_snapshots.stats.Request': 'searchable_snapshots/stats/SearchableSnapshotsStatsRequest.ts#L24-L36',
'searchable_snapshots.stats.Response': 'searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27',
'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L41',
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L164-L166',
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L191-L193',
'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L26-L39',
'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24',
'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L41-L79',
'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22',
'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L33-L42',
'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25',
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L160-L162',
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L187-L189',
'security._types.GrantType': 'security/_types/GrantType.ts#L20-L23',
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L138-L158',
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L165-L185',
'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L81-L104',
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L168-L170',
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L195-L197',
'security._types.Realm': 'security/_types/RoleMappingRule.ts#L44-L46',
'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25',
'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L27-L36',
'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L38-L47',
'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L31',
'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L23-L31',
'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L159-L160',
'security._types.RoleTemplateInlineScript': 'security/_types/Privileges.ts#L152-L157',
'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L162-L163',
'security._types.TransientMetadataConfig': 'security/_types/TransientMetadataConfig.ts#L20-L22',
'security._types.User': 'security/_types/User.ts#L23-L31',
'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L106-L128',
'security._types.UserProfile': 'security/_types/UserProfile.ts#L42-L48',
'security._types.UserProfileHitMetadata': 'security/_types/UserProfile.ts#L28-L31',
'security._types.UserProfileUser': 'security/_types/UserProfile.ts#L33-L40',
Expand Down Expand Up @@ -2133,7 +2138,7 @@
'security.get_user.Request': 'security/get_user/SecurityGetUserRequest.ts#L23-L41',
'security.get_user.Response': 'security/get_user/SecurityGetUserResponse.ts#L23-L25',
'security.get_user_privileges.Request': 'security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts#L23-L36',
'security.get_user_privileges.Response': 'security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L26-L37',
'security.get_user_privileges.Response': 'security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L27-L35',
'security.get_user_profile.GetUserProfileErrors': 'security/get_user_profile/types.ts#L25-L28',
'security.get_user_profile.Request': 'security/get_user_profile/Request.ts#L23-L46',
'security.get_user_profile.Response': 'security/get_user_profile/Response.ts#L23-L28',
Expand Down Expand Up @@ -2525,10 +2530,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/9b556a1c9fd30159115d6c15226d0cac53a1d1a7/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/e7e16d652a197629b2c2d5df3abbcd5fb9c48d1a/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/9b556a1c9fd30159115d6c15226d0cac53a1d1a7/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/e7e16d652a197629b2c2d5df3abbcd5fb9c48d1a/specification/">Elasticsearch API specification</a>.
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ public class CircleProcessor extends ProcessorBase implements ProcessorVariant {

private final String field;

private final boolean ignoreMissing;
@Nullable
private final Boolean ignoreMissing;

private final ShapeType shapeType;

@Nullable
private final String targetField;

// ---------------------------------------------------------------------------------------------
Expand All @@ -64,9 +66,9 @@ private CircleProcessor(Builder builder) {

this.errorDistance = ApiTypeHelper.requireNonNull(builder.errorDistance, this, "errorDistance");
this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field");
this.ignoreMissing = ApiTypeHelper.requireNonNull(builder.ignoreMissing, this, "ignoreMissing");
this.ignoreMissing = builder.ignoreMissing;
this.shapeType = ApiTypeHelper.requireNonNull(builder.shapeType, this, "shapeType");
this.targetField = ApiTypeHelper.requireNonNull(builder.targetField, this, "targetField");
this.targetField = builder.targetField;

}

Expand Down Expand Up @@ -97,9 +99,10 @@ public final String field() {
}

/**
* Required - API name: {@code ignore_missing}
* API name: {@code ignore_missing}
*/
public final boolean ignoreMissing() {
@Nullable
public final Boolean ignoreMissing() {
return this.ignoreMissing;
}

Expand All @@ -111,8 +114,9 @@ public final ShapeType shapeType() {
}

/**
* Required - API name: {@code target_field}
* API name: {@code target_field}
*/
@Nullable
public final String targetField() {
return this.targetField;
}
Expand All @@ -126,13 +130,18 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("field");
generator.write(this.field);

generator.writeKey("ignore_missing");
generator.write(this.ignoreMissing);
if (this.ignoreMissing != null) {
generator.writeKey("ignore_missing");
generator.write(this.ignoreMissing);

}
generator.writeKey("shape_type");
this.shapeType.serialize(generator, mapper);
generator.writeKey("target_field");
generator.write(this.targetField);
if (this.targetField != null) {
generator.writeKey("target_field");
generator.write(this.targetField);

}

}

Expand All @@ -149,10 +158,12 @@ public static class Builder extends ProcessorBase.AbstractBuilder<Builder>

private String field;

@Nullable
private Boolean ignoreMissing;

private ShapeType shapeType;

@Nullable
private String targetField;

/**
Expand All @@ -172,9 +183,9 @@ public final Builder field(String value) {
}

/**
* Required - API name: {@code ignore_missing}
* API name: {@code ignore_missing}
*/
public final Builder ignoreMissing(boolean value) {
public final Builder ignoreMissing(@Nullable Boolean value) {
this.ignoreMissing = value;
return this;
}
Expand All @@ -188,9 +199,9 @@ public final Builder shapeType(ShapeType value) {
}

/**
* Required - API name: {@code target_field}
* API name: {@code target_field}
*/
public final Builder targetField(String value) {
public final Builder targetField(@Nullable String value) {
this.targetField = value;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class ConvertProcessor extends ProcessorBase implements ProcessorVariant
@Nullable
private final Boolean ignoreMissing;

@Nullable
private final String targetField;

private final ConvertType type;
Expand All @@ -62,7 +63,7 @@ private ConvertProcessor(Builder builder) {

this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field");
this.ignoreMissing = builder.ignoreMissing;
this.targetField = ApiTypeHelper.requireNonNull(builder.targetField, this, "targetField");
this.targetField = builder.targetField;
this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type");

}
Expand Down Expand Up @@ -95,8 +96,9 @@ public final Boolean ignoreMissing() {
}

/**
* Required - API name: {@code target_field}
* API name: {@code target_field}
*/
@Nullable
public final String targetField() {
return this.targetField;
}
Expand All @@ -119,9 +121,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.ignoreMissing);

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

}
generator.writeKey("type");
this.type.serialize(generator, mapper);

Expand All @@ -141,6 +145,7 @@ public static class Builder extends ProcessorBase.AbstractBuilder<Builder>
@Nullable
private Boolean ignoreMissing;

@Nullable
private String targetField;

private ConvertType type;
Expand All @@ -162,9 +167,9 @@ public final Builder ignoreMissing(@Nullable Boolean value) {
}

/**
* Required - API name: {@code target_field}
* API name: {@code target_field}
*/
public final Builder targetField(String value) {
public final Builder targetField(@Nullable String value) {
this.targetField = value;
return this;
}
Expand Down
Loading

0 comments on commit 8e4be9c

Please sign in to comment.