/** * @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(mode = JsonCreator.Mode.DELEGATING) static ListTasksResponse fromJson(Json json) { ListTasksResponse.Builder builder = ListTasksResponse.builder(); if (json.pagination != null) { builder.pagination(json.pagination); } if (json.resources != null) { builder.addAllResources(json.resources); } return builder.build(); }
/** * Copy abstract value type {@code _ListTasksResponse} instance into builder. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ final Builder from(_ListTasksResponse instance) { Objects.requireNonNull(instance, "instance"); Pagination paginationValue = instance.getPagination(); if (paginationValue != null) { pagination(paginationValue); } List<TaskResource> resourcesValue = instance.getResources(); if (resourcesValue != null) { addAllResources(resourcesValue); } return this; }
/** * Sets or replaces all elements for {@link ListTasksResponse#getResources() resources} list. * @param elements An iterable of resources elements * @return {@code this} builder for use in a chained invocation */ @JsonProperty("resources") public final Builder resources(@Nullable Iterable<? extends TaskResource> elements) { if (elements == null) { this.resources = null; return this; } this.resources = new ArrayList<TaskResource>(); return addAllResources(elements); }
/** * Creates a builder for {@link ListTasksResponse ListTasksResponse}. * @return A new ListTasksResponse builder */ public static ListTasksResponse.Builder builder() { return new ListTasksResponse.Builder(); }
/** * Fill a builder with attribute values from the provided {@code ListTasksResponse} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(ListTasksResponse instance) { return from((_ListTasksResponse) instance); }