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