/** * @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 ImmutableSessionCreatedResponse fromJson(Json json) { ImmutableSessionCreatedResponse.Builder builder = ImmutableSessionCreatedResponse.builder(); if (json.id != null) { builder.id(json.id); } return builder.build(); }
/** * Builds a new {@link ImmutableSessionCreatedResponse ImmutableSessionCreatedResponse}. * @return An immutable instance of SessionCreatedResponse * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableSessionCreatedResponse build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableSessionCreatedResponse(id); }
/** * Creates an immutable copy of a {@link SessionCreatedResponse} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable SessionCreatedResponse instance */ public static ImmutableSessionCreatedResponse copyOf(SessionCreatedResponse instance) { if (instance instanceof ImmutableSessionCreatedResponse) { return (ImmutableSessionCreatedResponse) instance; } return ImmutableSessionCreatedResponse.builder() .from(instance) .build(); }
/** * Creates a builder for {@link ImmutableSessionCreatedResponse ImmutableSessionCreatedResponse}. * @return A new ImmutableSessionCreatedResponse builder */ public static ImmutableSessionCreatedResponse.Builder builder() { return new ImmutableSessionCreatedResponse.Builder(); }
/** * Fill a builder with attribute values from the provided {@code SessionCreatedResponse} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SessionCreatedResponse instance) { Preconditions.checkNotNull(instance, "instance"); id(instance.getId()); return this; }