001 002package com.commercetools.history.models.label; 003 004import java.time.*; 005import java.util.*; 006import java.util.function.Function; 007 008import javax.annotation.Nullable; 009import javax.validation.constraints.NotNull; 010 011import com.fasterxml.jackson.annotation.*; 012import com.fasterxml.jackson.databind.annotation.*; 013 014import io.vrap.rmf.base.client.utils.Generated; 015 016/** 017 * AssociateRoleLabel 018 * 019 * <hr> 020 * Example to create an instance using the builder pattern 021 * <div class=code-example> 022 * <pre><code class='java'> 023 * AssociateRoleLabel associateRoleLabel = AssociateRoleLabel.builder() 024 * .key("{key}") 025 * .name("{name}") 026 * .build() 027 * </code></pre> 028 * </div> 029 */ 030@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 031@JsonDeserialize(as = AssociateRoleLabelImpl.class) 032public interface AssociateRoleLabel extends Label { 033 034 /** 035 * discriminator value for AssociateRoleLabel 036 */ 037 String ASSOCIATE_ROLE_LABEL = "AssociateRoleLabel"; 038 039 /** 040 * 041 * @return type 042 */ 043 @NotNull 044 @JsonProperty("type") 045 public String getType(); 046 047 /** 048 * <p>User-defined unique identifier of the Associate Role.</p> 049 * @return key 050 */ 051 @NotNull 052 @JsonProperty("key") 053 public String getKey(); 054 055 /** 056 * <p>Name of the Associate Role.</p> 057 * @return name 058 */ 059 @NotNull 060 @JsonProperty("name") 061 public String getName(); 062 063 /** 064 * <p>User-defined unique identifier of the Associate Role.</p> 065 * @param key value to be set 066 */ 067 068 public void setKey(final String key); 069 070 /** 071 * <p>Name of the Associate Role.</p> 072 * @param name value to be set 073 */ 074 075 public void setName(final String name); 076 077 /** 078 * factory method 079 * @return instance of AssociateRoleLabel 080 */ 081 public static AssociateRoleLabel of() { 082 return new AssociateRoleLabelImpl(); 083 } 084 085 /** 086 * factory method to create a shallow copy AssociateRoleLabel 087 * @param template instance to be copied 088 * @return copy instance 089 */ 090 public static AssociateRoleLabel of(final AssociateRoleLabel template) { 091 AssociateRoleLabelImpl instance = new AssociateRoleLabelImpl(); 092 instance.setKey(template.getKey()); 093 instance.setName(template.getName()); 094 return instance; 095 } 096 097 /** 098 * factory method to create a deep copy of AssociateRoleLabel 099 * @param template instance to be copied 100 * @return copy instance 101 */ 102 @Nullable 103 public static AssociateRoleLabel deepCopy(@Nullable final AssociateRoleLabel template) { 104 if (template == null) { 105 return null; 106 } 107 AssociateRoleLabelImpl instance = new AssociateRoleLabelImpl(); 108 instance.setKey(template.getKey()); 109 instance.setName(template.getName()); 110 return instance; 111 } 112 113 /** 114 * builder factory method for AssociateRoleLabel 115 * @return builder 116 */ 117 public static AssociateRoleLabelBuilder builder() { 118 return AssociateRoleLabelBuilder.of(); 119 } 120 121 /** 122 * create builder for AssociateRoleLabel instance 123 * @param template instance with prefilled values for the builder 124 * @return builder 125 */ 126 public static AssociateRoleLabelBuilder builder(final AssociateRoleLabel template) { 127 return AssociateRoleLabelBuilder.of(template); 128 } 129 130 /** 131 * accessor map function 132 * @param <T> mapped type 133 * @param helper function to map the object 134 * @return mapped value 135 */ 136 default <T> T withAssociateRoleLabel(Function<AssociateRoleLabel, T> helper) { 137 return helper.apply(this); 138 } 139 140 /** 141 * gives a TypeReference for usage with Jackson DataBind 142 * @return TypeReference 143 */ 144 public static com.fasterxml.jackson.core.type.TypeReference<AssociateRoleLabel> typeReference() { 145 return new com.fasterxml.jackson.core.type.TypeReference<AssociateRoleLabel>() { 146 @Override 147 public String toString() { 148 return "TypeReference<AssociateRoleLabel>"; 149 } 150 }; 151 } 152}