001 002package com.commercetools.api.models.product; 003 004import java.time.*; 005import java.util.*; 006import java.util.function.Function; 007 008import javax.annotation.Nullable; 009import javax.validation.Valid; 010 011import com.commercetools.api.models.common.LocalizedString; 012import com.fasterxml.jackson.annotation.*; 013import com.fasterxml.jackson.databind.annotation.*; 014 015import io.vrap.rmf.base.client.utils.Generated; 016 017/** 018 * ProductSetMetaTitleAction 019 * 020 * <hr> 021 * Example to create an instance using the builder pattern 022 * <div class=code-example> 023 * <pre><code class='java'> 024 * ProductSetMetaTitleAction productSetMetaTitleAction = ProductSetMetaTitleAction.builder() 025 * .build() 026 * </code></pre> 027 * </div> 028 */ 029@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 030@JsonDeserialize(as = ProductSetMetaTitleActionImpl.class) 031public interface ProductSetMetaTitleAction extends ProductUpdateAction { 032 033 /** 034 * discriminator value for ProductSetMetaTitleAction 035 */ 036 String SET_META_TITLE = "setMetaTitle"; 037 038 /** 039 * <p>Value to set. If empty, any existing value will be removed.</p> 040 * @return metaTitle 041 */ 042 @Valid 043 @JsonProperty("metaTitle") 044 public LocalizedString getMetaTitle(); 045 046 /** 047 * <p>If <code>true</code>, only the staged <code>metaTitle</code> is updated. If <code>false</code>, both the current and staged <code>metaTitle</code> are updated.</p> 048 * @return staged 049 */ 050 051 @JsonProperty("staged") 052 public Boolean getStaged(); 053 054 /** 055 * <p>Value to set. If empty, any existing value will be removed.</p> 056 * @param metaTitle value to be set 057 */ 058 059 public void setMetaTitle(final LocalizedString metaTitle); 060 061 /** 062 * <p>If <code>true</code>, only the staged <code>metaTitle</code> is updated. If <code>false</code>, both the current and staged <code>metaTitle</code> are updated.</p> 063 * @param staged value to be set 064 */ 065 066 public void setStaged(final Boolean staged); 067 068 /** 069 * factory method 070 * @return instance of ProductSetMetaTitleAction 071 */ 072 public static ProductSetMetaTitleAction of() { 073 return new ProductSetMetaTitleActionImpl(); 074 } 075 076 /** 077 * factory method to create a shallow copy ProductSetMetaTitleAction 078 * @param template instance to be copied 079 * @return copy instance 080 */ 081 public static ProductSetMetaTitleAction of(final ProductSetMetaTitleAction template) { 082 ProductSetMetaTitleActionImpl instance = new ProductSetMetaTitleActionImpl(); 083 instance.setMetaTitle(template.getMetaTitle()); 084 instance.setStaged(template.getStaged()); 085 return instance; 086 } 087 088 /** 089 * factory method to create a deep copy of ProductSetMetaTitleAction 090 * @param template instance to be copied 091 * @return copy instance 092 */ 093 @Nullable 094 public static ProductSetMetaTitleAction deepCopy(@Nullable final ProductSetMetaTitleAction template) { 095 if (template == null) { 096 return null; 097 } 098 ProductSetMetaTitleActionImpl instance = new ProductSetMetaTitleActionImpl(); 099 instance.setMetaTitle(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaTitle())); 100 instance.setStaged(template.getStaged()); 101 return instance; 102 } 103 104 /** 105 * builder factory method for ProductSetMetaTitleAction 106 * @return builder 107 */ 108 public static ProductSetMetaTitleActionBuilder builder() { 109 return ProductSetMetaTitleActionBuilder.of(); 110 } 111 112 /** 113 * create builder for ProductSetMetaTitleAction instance 114 * @param template instance with prefilled values for the builder 115 * @return builder 116 */ 117 public static ProductSetMetaTitleActionBuilder builder(final ProductSetMetaTitleAction template) { 118 return ProductSetMetaTitleActionBuilder.of(template); 119 } 120 121 /** 122 * accessor map function 123 * @param <T> mapped type 124 * @param helper function to map the object 125 * @return mapped value 126 */ 127 default <T> T withProductSetMetaTitleAction(Function<ProductSetMetaTitleAction, T> helper) { 128 return helper.apply(this); 129 } 130 131 /** 132 * gives a TypeReference for usage with Jackson DataBind 133 * @return TypeReference 134 */ 135 public static com.fasterxml.jackson.core.type.TypeReference<ProductSetMetaTitleAction> typeReference() { 136 return new com.fasterxml.jackson.core.type.TypeReference<ProductSetMetaTitleAction>() { 137 @Override 138 public String toString() { 139 return "TypeReference<ProductSetMetaTitleAction>"; 140 } 141 }; 142 } 143}