Class CustomObjectDraftBuilder

java.lang.Object
com.commercetools.api.models.custom_object.CustomObjectDraftBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CustomObjectDraft>

public class CustomObjectDraftBuilder extends Object implements io.vrap.rmf.base.client.Builder<CustomObjectDraft>
CustomObjectDraftBuilder
Example to create an instance using the builder pattern

     CustomObjectDraft customObjectDraft = CustomObjectDraft.builder()
             .container("{container}")
             .key("{key}")
             .build()
 
  • Constructor Details

  • Method Details

    • container

      Namespace to group CustomObjects.

      Parameters:
      container - value to be set
      Returns:
      Builder
    • key

      User-defined unique identifier of the CustomObject within the defined container.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • value

      JSON standard types Number, String, Boolean, Array, Object, and common API data types. For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the value points to a non-existing object in such case.

      Parameters:
      value - value to be set
      Returns:
      Builder
    • version

      Current version of the CustomObject.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • getContainer

      public String getContainer()

      Namespace to group CustomObjects.

      Returns:
      container
    • getKey

      public String getKey()

      User-defined unique identifier of the CustomObject within the defined container.

      Returns:
      key
    • getValue

      public Object getValue()

      JSON standard types Number, String, Boolean, Array, Object, and common API data types. For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the value points to a non-existing object in such case.

      Returns:
      value
    • getVersion

      Current version of the CustomObject.

      Returns:
      version
    • build

      builds CustomObjectDraft with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<CustomObjectDraft>
      Returns:
      CustomObjectDraft
    • buildUnchecked

      builds CustomObjectDraft without checking for non-null required values
      Returns:
      CustomObjectDraft
    • of

      public static CustomObjectDraftBuilder of()
      factory method for an instance of CustomObjectDraftBuilder
      Returns:
      builder
    • of

      public static CustomObjectDraftBuilder of(CustomObjectDraft template)
      create builder for CustomObjectDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder