All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.commercetools.history.models.change_value.ChangeTargetChangeValue Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.history.models.change_value;

import java.time.*;
import java.util.*;
import java.util.function.Function;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

import io.vrap.rmf.base.client.utils.Generated;

/**
 * ChangeTargetChangeValue
 *
 * 
* Example to create a subtype instance using the builder pattern *
*

 *     ChangeTargetChangeValue changeTargetChangeValue = ChangeTargetChangeValue.customLineItemsBuilder()
 *             predicate("{predicate}")
 *             .build()
 * 
*
*/ @JsonSubTypes({ @JsonSubTypes.Type(value = com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValueImpl.class, name = ChangeTargetCustomLineItemsChangeValue.CUSTOM_LINE_ITEMS), @JsonSubTypes.Type(value = com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValueImpl.class, name = ChangeTargetLineItemsChangeValue.LINE_ITEMS), @JsonSubTypes.Type(value = com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValueImpl.class, name = ChangeTargetMultiBuyCustomLineItemsChangeValue.MULTI_BUY_CUSTOM_LINE_ITEMS), @JsonSubTypes.Type(value = com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValueImpl.class, name = ChangeTargetMultiBuyLineItemsChangeValue.MULTI_BUY_LINE_ITEMS), @JsonSubTypes.Type(value = com.commercetools.history.models.change_value.ChangeTargetShippingChangeValueImpl.class, name = ChangeTargetShippingChangeValue.SHIPPING) }) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = ChangeTargetChangeValueImpl.class, visible = true) @JsonDeserialize(as = ChangeTargetChangeValueImpl.class) @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ChangeTargetChangeValue { /** * * @return type */ @NotNull @JsonProperty("type") public String getType(); /** * factory method to create a deep copy of ChangeTargetChangeValue * @param template instance to be copied * @return copy instance */ @Nullable public static ChangeTargetChangeValue deepCopy(@Nullable final ChangeTargetChangeValue template) { if (template == null) { return null; } if (template instanceof com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValue) { return com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValue.deepCopy( (com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValue) template); } if (template instanceof com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValue) { return com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValue.deepCopy( (com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValue) template); } if (template instanceof com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValue) { return com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValue .deepCopy( (com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValue) template); } if (template instanceof com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValue) { return com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValue.deepCopy( (com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValue) template); } if (template instanceof com.commercetools.history.models.change_value.ChangeTargetShippingChangeValue) { return com.commercetools.history.models.change_value.ChangeTargetShippingChangeValue .deepCopy((com.commercetools.history.models.change_value.ChangeTargetShippingChangeValue) template); } ChangeTargetChangeValueImpl instance = new ChangeTargetChangeValueImpl(); return instance; } /** * builder for customLineItems subtype * @return builder */ public static com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValueBuilder customLineItemsBuilder() { return com.commercetools.history.models.change_value.ChangeTargetCustomLineItemsChangeValueBuilder.of(); } /** * builder for lineItems subtype * @return builder */ public static com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValueBuilder lineItemsBuilder() { return com.commercetools.history.models.change_value.ChangeTargetLineItemsChangeValueBuilder.of(); } /** * builder for multiBuyCustomLineItems subtype * @return builder */ public static com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValueBuilder multiBuyCustomLineItemsBuilder() { return com.commercetools.history.models.change_value.ChangeTargetMultiBuyCustomLineItemsChangeValueBuilder.of(); } /** * builder for multiBuyLineItems subtype * @return builder */ public static com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValueBuilder multiBuyLineItemsBuilder() { return com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValueBuilder.of(); } /** * builder for shipping subtype * @return builder */ public static com.commercetools.history.models.change_value.ChangeTargetShippingChangeValueBuilder shippingBuilder() { return com.commercetools.history.models.change_value.ChangeTargetShippingChangeValueBuilder.of(); } /** * accessor map function * @param mapped type * @param helper function to map the object * @return mapped value */ default T withChangeTargetChangeValue(Function helper) { return helper.apply(this); } /** * gives a TypeReference for usage with Jackson DataBind * @return TypeReference */ public static com.fasterxml.jackson.core.type.TypeReference typeReference() { return new com.fasterxml.jackson.core.type.TypeReference() { @Override public String toString() { return "TypeReference"; } }; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy