001 002package com.commercetools.api.models.standalone_price; 003 004import java.util.*; 005 006import io.vrap.rmf.base.client.Builder; 007import io.vrap.rmf.base.client.utils.Generated; 008 009/** 010 * StandalonePriceChangeActiveActionBuilder 011 * <hr> 012 * Example to create an instance using the builder pattern 013 * <div class=code-example> 014 * <pre><code class='java'> 015 * StandalonePriceChangeActiveAction standalonePriceChangeActiveAction = StandalonePriceChangeActiveAction.builder() 016 * .active(true) 017 * .build() 018 * </code></pre> 019 * </div> 020 */ 021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 022public class StandalonePriceChangeActiveActionBuilder implements Builder<StandalonePriceChangeActiveAction> { 023 024 private Boolean active; 025 026 /** 027 * <p>New value to set for the <code>active</code> field of the StandalonePrice.</p> 028 * @param active value to be set 029 * @return Builder 030 */ 031 032 public StandalonePriceChangeActiveActionBuilder active(final Boolean active) { 033 this.active = active; 034 return this; 035 } 036 037 /** 038 * <p>New value to set for the <code>active</code> field of the StandalonePrice.</p> 039 * @return active 040 */ 041 042 public Boolean getActive() { 043 return this.active; 044 } 045 046 /** 047 * builds StandalonePriceChangeActiveAction with checking for non-null required values 048 * @return StandalonePriceChangeActiveAction 049 */ 050 public StandalonePriceChangeActiveAction build() { 051 Objects.requireNonNull(active, StandalonePriceChangeActiveAction.class + ": active is missing"); 052 return new StandalonePriceChangeActiveActionImpl(active); 053 } 054 055 /** 056 * builds StandalonePriceChangeActiveAction without checking for non-null required values 057 * @return StandalonePriceChangeActiveAction 058 */ 059 public StandalonePriceChangeActiveAction buildUnchecked() { 060 return new StandalonePriceChangeActiveActionImpl(active); 061 } 062 063 /** 064 * factory method for an instance of StandalonePriceChangeActiveActionBuilder 065 * @return builder 066 */ 067 public static StandalonePriceChangeActiveActionBuilder of() { 068 return new StandalonePriceChangeActiveActionBuilder(); 069 } 070 071 /** 072 * create builder for StandalonePriceChangeActiveAction instance 073 * @param template instance with prefilled values for the builder 074 * @return builder 075 */ 076 public static StandalonePriceChangeActiveActionBuilder of(final StandalonePriceChangeActiveAction template) { 077 StandalonePriceChangeActiveActionBuilder builder = new StandalonePriceChangeActiveActionBuilder(); 078 builder.active = template.getActive(); 079 return builder; 080 } 081 082}