001 002package com.commercetools.api.models.payment; 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 * PaymentSetMethodInfoInterfaceAction 018 * 019 * <hr> 020 * Example to create an instance using the builder pattern 021 * <div class=code-example> 022 * <pre><code class='java'> 023 * PaymentSetMethodInfoInterfaceAction paymentSetMethodInfoInterfaceAction = PaymentSetMethodInfoInterfaceAction.builder() 024 * .interface("{interface}") 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 = PaymentSetMethodInfoInterfaceActionImpl.class) 031public interface PaymentSetMethodInfoInterfaceAction extends PaymentUpdateAction { 032 033 /** 034 * discriminator value for PaymentSetMethodInfoInterfaceAction 035 */ 036 String SET_METHOD_INFO_INTERFACE = "setMethodInfoInterface"; 037 038 /** 039 * <p>Value to set. Once set, the <code>paymentInterface</code> of the <code>paymentMethodInfo</code> cannot be changed.</p> 040 * @return interface 041 */ 042 @NotNull 043 @JsonProperty("interface") 044 public String getInterface(); 045 046 /** 047 * <p>Value to set. Once set, the <code>paymentInterface</code> of the <code>paymentMethodInfo</code> cannot be changed.</p> 048 * @param _interface value to be set 049 */ 050 051 public void setInterface(final String _interface); 052 053 /** 054 * factory method 055 * @return instance of PaymentSetMethodInfoInterfaceAction 056 */ 057 public static PaymentSetMethodInfoInterfaceAction of() { 058 return new PaymentSetMethodInfoInterfaceActionImpl(); 059 } 060 061 /** 062 * factory method to create a shallow copy PaymentSetMethodInfoInterfaceAction 063 * @param template instance to be copied 064 * @return copy instance 065 */ 066 public static PaymentSetMethodInfoInterfaceAction of(final PaymentSetMethodInfoInterfaceAction template) { 067 PaymentSetMethodInfoInterfaceActionImpl instance = new PaymentSetMethodInfoInterfaceActionImpl(); 068 instance.setInterface(template.getInterface()); 069 return instance; 070 } 071 072 /** 073 * factory method to create a deep copy of PaymentSetMethodInfoInterfaceAction 074 * @param template instance to be copied 075 * @return copy instance 076 */ 077 @Nullable 078 public static PaymentSetMethodInfoInterfaceAction deepCopy( 079 @Nullable final PaymentSetMethodInfoInterfaceAction template) { 080 if (template == null) { 081 return null; 082 } 083 PaymentSetMethodInfoInterfaceActionImpl instance = new PaymentSetMethodInfoInterfaceActionImpl(); 084 instance.setInterface(template.getInterface()); 085 return instance; 086 } 087 088 /** 089 * builder factory method for PaymentSetMethodInfoInterfaceAction 090 * @return builder 091 */ 092 public static PaymentSetMethodInfoInterfaceActionBuilder builder() { 093 return PaymentSetMethodInfoInterfaceActionBuilder.of(); 094 } 095 096 /** 097 * create builder for PaymentSetMethodInfoInterfaceAction instance 098 * @param template instance with prefilled values for the builder 099 * @return builder 100 */ 101 public static PaymentSetMethodInfoInterfaceActionBuilder builder( 102 final PaymentSetMethodInfoInterfaceAction template) { 103 return PaymentSetMethodInfoInterfaceActionBuilder.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 withPaymentSetMethodInfoInterfaceAction(Function<PaymentSetMethodInfoInterfaceAction, T> helper) { 113 return helper.apply(this); 114 } 115 116 /** 117 * gives a TypeReference for usage with Jackson DataBind 118 * @return TypeReference 119 */ 120 public static com.fasterxml.jackson.core.type.TypeReference<PaymentSetMethodInfoInterfaceAction> typeReference() { 121 return new com.fasterxml.jackson.core.type.TypeReference<PaymentSetMethodInfoInterfaceAction>() { 122 @Override 123 public String toString() { 124 return "TypeReference<PaymentSetMethodInfoInterfaceAction>"; 125 } 126 }; 127 } 128}