/** * Builds a new {@link GetTaskResponse GetTaskResponse}. * @return An immutable instance of GetTaskResponse * @throws java.lang.IllegalStateException if any required attributes are missing */ public GetTaskResponse build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new GetTaskResponse(this); }
/** * Copy abstract value type {@code _GetTaskResponse} instance into builder. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(_GetTaskResponse instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
GetTaskResponse.Builder builder = GetTaskResponse.builder(); if (json.command != null) { builder.command(json.command); builder.diskInMb(json.diskInMb); builder.dropletId(json.dropletId); builder.memoryInMb(json.memoryInMb); builder.name(json.name); builder.result(json.result); builder.sequenceId(json.sequenceId); builder.state(json.state); builder.createdAt(json.createdAt); builder.id(json.id); builder.putAllLinks(json.links); builder.updatedAt(json.updatedAt); return builder.build();
private void from(Object object) { if (object instanceof Resource) { Resource instance = (Resource) object; createdAt(instance.getCreatedAt()); putAllLinks(instance.getLinks()); id(instance.getId()); String updatedAtValue = instance.getUpdatedAt(); if (updatedAtValue != null) { updatedAt(updatedAtValue); } } if (object instanceof Task) { Task instance = (Task) object; diskInMb(instance.getDiskInMb()); Result resultValue = instance.getResult(); if (resultValue != null) { result(resultValue); } dropletId(instance.getDropletId()); memoryInMb(instance.getMemoryInMb()); name(instance.getName()); state(instance.getState()); sequenceId(instance.getSequenceId()); String commandValue = instance.getCommand(); if (commandValue != null) { command(commandValue); } } }
/** * Fill a builder with attribute values from the provided {@code GetTaskResponse} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(GetTaskResponse instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * Fill a builder with attribute values from the provided {@code org.cloudfoundry.client.v3.tasks.Task} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(Task instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * Fill a builder with attribute values from the provided {@code org.cloudfoundry.client.v3.Resource} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(Resource instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * Creates a builder for {@link GetTaskResponse GetTaskResponse}. * @return A new GetTaskResponse builder */ public static GetTaskResponse.Builder builder() { return new GetTaskResponse.Builder(); }