001 002package com.commercetools.api.models.me; 003 004import java.util.*; 005 006import javax.annotation.Nullable; 007 008import io.vrap.rmf.base.client.Builder; 009import io.vrap.rmf.base.client.utils.Generated; 010 011/** 012 * MyCartSetLocaleActionBuilder 013 * <hr> 014 * Example to create an instance using the builder pattern 015 * <div class=code-example> 016 * <pre><code class='java'> 017 * MyCartSetLocaleAction myCartSetLocaleAction = MyCartSetLocaleAction.builder() 018 * .build() 019 * </code></pre> 020 * </div> 021 */ 022@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 023public class MyCartSetLocaleActionBuilder implements Builder<MyCartSetLocaleAction> { 024 025 @Nullable 026 private String locale; 027 028 /** 029 * <p>Value to set. Must be one of the Project's <code>languages</code>. If empty, any existing value will be removed.</p> 030 * @param locale value to be set 031 * @return Builder 032 */ 033 034 public MyCartSetLocaleActionBuilder locale(@Nullable final String locale) { 035 this.locale = locale; 036 return this; 037 } 038 039 /** 040 * <p>Value to set. Must be one of the Project's <code>languages</code>. If empty, any existing value will be removed.</p> 041 * @return locale 042 */ 043 044 @Nullable 045 public String getLocale() { 046 return this.locale; 047 } 048 049 /** 050 * builds MyCartSetLocaleAction with checking for non-null required values 051 * @return MyCartSetLocaleAction 052 */ 053 public MyCartSetLocaleAction build() { 054 return new MyCartSetLocaleActionImpl(locale); 055 } 056 057 /** 058 * builds MyCartSetLocaleAction without checking for non-null required values 059 * @return MyCartSetLocaleAction 060 */ 061 public MyCartSetLocaleAction buildUnchecked() { 062 return new MyCartSetLocaleActionImpl(locale); 063 } 064 065 /** 066 * factory method for an instance of MyCartSetLocaleActionBuilder 067 * @return builder 068 */ 069 public static MyCartSetLocaleActionBuilder of() { 070 return new MyCartSetLocaleActionBuilder(); 071 } 072 073 /** 074 * create builder for MyCartSetLocaleAction instance 075 * @param template instance with prefilled values for the builder 076 * @return builder 077 */ 078 public static MyCartSetLocaleActionBuilder of(final MyCartSetLocaleAction template) { 079 MyCartSetLocaleActionBuilder builder = new MyCartSetLocaleActionBuilder(); 080 builder.locale = template.getLocale(); 081 return builder; 082 } 083 084}