protected static <T extends BroadcastResponse> void declareBroadcastFields(ConstructingObjectParser<T, Void> PARSER) { ConstructingObjectParser<BroadcastResponse, Void> shardsParser = new ConstructingObjectParser<>("_shards", true, arg -> new BroadcastResponse((int) arg[0], (int) arg[1], (int) arg[2], (List<DefaultShardOperationFailedException>) arg[3])); shardsParser.declareInt(constructorArg(), TOTAL_FIELD); shardsParser.declareInt(constructorArg(), SUCCESSFUL_FIELD); shardsParser.declareInt(constructorArg(), FAILED_FIELD); shardsParser.declareObjectArray(optionalConstructorArg(), (p, c) -> DefaultShardOperationFailedException.fromXContent(p), FAILURES_FIELD); PARSER.declareObject(constructorArg(), shardsParser, _SHARDS_FIELD); }
protected static <T extends BroadcastResponse> void declareBroadcastFields(ConstructingObjectParser<T, Void> PARSER) { ConstructingObjectParser<BroadcastResponse, Void> shardsParser = new ConstructingObjectParser<>("_shards", true, arg -> new BroadcastResponse((int) arg[0], (int) arg[1], (int) arg[2], (List<DefaultShardOperationFailedException>) arg[3])); shardsParser.declareInt(constructorArg(), TOTAL_FIELD); shardsParser.declareInt(constructorArg(), SUCCESSFUL_FIELD); shardsParser.declareInt(constructorArg(), FAILED_FIELD); shardsParser.declareObjectArray(optionalConstructorArg(), (p, c) -> DefaultShardOperationFailedException.fromXContent(p), FAILURES_FIELD); PARSER.declareObject(constructorArg(), shardsParser, _SHARDS_FIELD); }
protected static <T extends BroadcastResponse> void declareBroadcastFields(ConstructingObjectParser<T, Void> PARSER) { ConstructingObjectParser<BroadcastResponse, Void> shardsParser = new ConstructingObjectParser<>("_shards", true, arg -> new BroadcastResponse((int) arg[0], (int) arg[1], (int) arg[2], (List<DefaultShardOperationFailedException>) arg[3])); shardsParser.declareInt(constructorArg(), TOTAL_FIELD); shardsParser.declareInt(constructorArg(), SUCCESSFUL_FIELD); shardsParser.declareInt(constructorArg(), FAILED_FIELD); shardsParser.declareObjectArray(optionalConstructorArg(), (p, c) -> DefaultShardOperationFailedException.fromXContent(p), FAILURES_FIELD); PARSER.declareObject(constructorArg(), shardsParser, _SHARDS_FIELD); }