/** * Builds a new {@link CancelTaskResponse CancelTaskResponse}. * @return An immutable instance of CancelTaskResponse * @throws java.lang.IllegalStateException if any required attributes are missing */ public CancelTaskResponse build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new CancelTaskResponse(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; }
CancelTaskResponse.Builder builder = CancelTaskResponse.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); } } }
/** * Creates a builder for {@link CancelTaskResponse CancelTaskResponse}. * @return A new CancelTaskResponse builder */ public static CancelTaskResponse.Builder builder() { return new CancelTaskResponse.Builder(); }
/** * Copy abstract value type {@code _CancelTaskResponse} 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(_CancelTaskResponse 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 CancelTaskResponse} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(CancelTaskResponse instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }