/** * Sets or replaces all elements for {@link Session#getChecks() checks} list. * @param elements An iterable of checks elements * @return {@code this} builder for use in a chained invocation */ public final Builder checks(Iterable<String> elements) { checksBuilder = ImmutableList.builder(); return addAllChecks(elements); }
node(nodeOptional); addAllChecks(instance.getChecks()); Optional<String> behaviorOptional = instance.getBehavior(); if (behaviorOptional.isPresent()) {
/** * @param json A JSON-bindable data structure * @return An immutable value type * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure */ @Deprecated @JsonCreator static ImmutableSession fromJson(Json json) { ImmutableSession.Builder builder = ImmutableSession.builder(); if (json.lockDelay != null) { builder.lockDelay(json.lockDelay); } if (json.name != null) { builder.name(json.name); } if (json.node != null) { builder.node(json.node); } if (json.checks != null) { builder.addAllChecks(json.checks); } if (json.behavior != null) { builder.behavior(json.behavior); } if (json.ttl != null) { builder.ttl(json.ttl); } return builder.build(); }