/** * Creates an immutable copy of a {@link CustomActionParameter} 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 CustomActionParameter instance */ public static ImmutableCustomActionParameter copyOf(CustomActionParameter instance) { if (instance instanceof ImmutableCustomActionParameter) { return (ImmutableCustomActionParameter) instance; } return ImmutableCustomActionParameter.builder() .from(instance) .build(); }