001 002package com.commercetools.api.models.category; 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 * CategorySetMetaKeywordsAction 019 * 020 * <hr> 021 * Example to create an instance using the builder pattern 022 * <div class=code-example> 023 * <pre><code class='java'> 024 * CategorySetMetaKeywordsAction categorySetMetaKeywordsAction = CategorySetMetaKeywordsAction.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 = CategorySetMetaKeywordsActionImpl.class) 031public interface CategorySetMetaKeywordsAction extends CategoryUpdateAction { 032 033 /** 034 * discriminator value for CategorySetMetaKeywordsAction 035 */ 036 String SET_META_KEYWORDS = "setMetaKeywords"; 037 038 /** 039 * <p>Value to set.</p> 040 * @return metaKeywords 041 */ 042 @Valid 043 @JsonProperty("metaKeywords") 044 public LocalizedString getMetaKeywords(); 045 046 /** 047 * <p>Value to set.</p> 048 * @param metaKeywords value to be set 049 */ 050 051 public void setMetaKeywords(final LocalizedString metaKeywords); 052 053 /** 054 * factory method 055 * @return instance of CategorySetMetaKeywordsAction 056 */ 057 public static CategorySetMetaKeywordsAction of() { 058 return new CategorySetMetaKeywordsActionImpl(); 059 } 060 061 /** 062 * factory method to create a shallow copy CategorySetMetaKeywordsAction 063 * @param template instance to be copied 064 * @return copy instance 065 */ 066 public static CategorySetMetaKeywordsAction of(final CategorySetMetaKeywordsAction template) { 067 CategorySetMetaKeywordsActionImpl instance = new CategorySetMetaKeywordsActionImpl(); 068 instance.setMetaKeywords(template.getMetaKeywords()); 069 return instance; 070 } 071 072 /** 073 * factory method to create a deep copy of CategorySetMetaKeywordsAction 074 * @param template instance to be copied 075 * @return copy instance 076 */ 077 @Nullable 078 public static CategorySetMetaKeywordsAction deepCopy(@Nullable final CategorySetMetaKeywordsAction template) { 079 if (template == null) { 080 return null; 081 } 082 CategorySetMetaKeywordsActionImpl instance = new CategorySetMetaKeywordsActionImpl(); 083 instance.setMetaKeywords( 084 com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); 085 return instance; 086 } 087 088 /** 089 * builder factory method for CategorySetMetaKeywordsAction 090 * @return builder 091 */ 092 public static CategorySetMetaKeywordsActionBuilder builder() { 093 return CategorySetMetaKeywordsActionBuilder.of(); 094 } 095 096 /** 097 * create builder for CategorySetMetaKeywordsAction instance 098 * @param template instance with prefilled values for the builder 099 * @return builder 100 */ 101 public static CategorySetMetaKeywordsActionBuilder builder(final CategorySetMetaKeywordsAction template) { 102 return CategorySetMetaKeywordsActionBuilder.of(template); 103 } 104 105 /** 106 * accessor map function 107 * @param <T> mapped type 108 * @param helper function to map the object 109 * @return mapped value 110 */ 111 default <T> T withCategorySetMetaKeywordsAction(Function<CategorySetMetaKeywordsAction, T> helper) { 112 return helper.apply(this); 113 } 114 115 /** 116 * gives a TypeReference for usage with Jackson DataBind 117 * @return TypeReference 118 */ 119 public static com.fasterxml.jackson.core.type.TypeReference<CategorySetMetaKeywordsAction> typeReference() { 120 return new com.fasterxml.jackson.core.type.TypeReference<CategorySetMetaKeywordsAction>() { 121 @Override 122 public String toString() { 123 return "TypeReference<CategorySetMetaKeywordsAction>"; 124 } 125 }; 126 } 127}