001 002package com.commercetools.api.models.standalone_price; 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 * StandalonePriceSetValidFromAndUntilActionBuilder 013 * <hr> 014 * Example to create an instance using the builder pattern 015 * <div class=code-example> 016 * <pre><code class='java'> 017 * StandalonePriceSetValidFromAndUntilAction standalonePriceSetValidFromAndUntilAction = StandalonePriceSetValidFromAndUntilAction.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 StandalonePriceSetValidFromAndUntilActionBuilder 024 implements Builder<StandalonePriceSetValidFromAndUntilAction> { 025 026 @Nullable 027 private java.time.ZonedDateTime validFrom; 028 029 @Nullable 030 private java.time.ZonedDateTime validUntil; 031 032 /** 033 * <p>Value to set. If empty, any existing value is removed.</p> 034 * @param validFrom value to be set 035 * @return Builder 036 */ 037 038 public StandalonePriceSetValidFromAndUntilActionBuilder validFrom( 039 @Nullable final java.time.ZonedDateTime validFrom) { 040 this.validFrom = validFrom; 041 return this; 042 } 043 044 /** 045 * <p>Value to set. If empty, any existing value is removed.</p> 046 * @param validUntil value to be set 047 * @return Builder 048 */ 049 050 public StandalonePriceSetValidFromAndUntilActionBuilder validUntil( 051 @Nullable final java.time.ZonedDateTime validUntil) { 052 this.validUntil = validUntil; 053 return this; 054 } 055 056 /** 057 * <p>Value to set. If empty, any existing value is removed.</p> 058 * @return validFrom 059 */ 060 061 @Nullable 062 public java.time.ZonedDateTime getValidFrom() { 063 return this.validFrom; 064 } 065 066 /** 067 * <p>Value to set. If empty, any existing value is removed.</p> 068 * @return validUntil 069 */ 070 071 @Nullable 072 public java.time.ZonedDateTime getValidUntil() { 073 return this.validUntil; 074 } 075 076 /** 077 * builds StandalonePriceSetValidFromAndUntilAction with checking for non-null required values 078 * @return StandalonePriceSetValidFromAndUntilAction 079 */ 080 public StandalonePriceSetValidFromAndUntilAction build() { 081 return new StandalonePriceSetValidFromAndUntilActionImpl(validFrom, validUntil); 082 } 083 084 /** 085 * builds StandalonePriceSetValidFromAndUntilAction without checking for non-null required values 086 * @return StandalonePriceSetValidFromAndUntilAction 087 */ 088 public StandalonePriceSetValidFromAndUntilAction buildUnchecked() { 089 return new StandalonePriceSetValidFromAndUntilActionImpl(validFrom, validUntil); 090 } 091 092 /** 093 * factory method for an instance of StandalonePriceSetValidFromAndUntilActionBuilder 094 * @return builder 095 */ 096 public static StandalonePriceSetValidFromAndUntilActionBuilder of() { 097 return new StandalonePriceSetValidFromAndUntilActionBuilder(); 098 } 099 100 /** 101 * create builder for StandalonePriceSetValidFromAndUntilAction instance 102 * @param template instance with prefilled values for the builder 103 * @return builder 104 */ 105 public static StandalonePriceSetValidFromAndUntilActionBuilder of( 106 final StandalonePriceSetValidFromAndUntilAction template) { 107 StandalonePriceSetValidFromAndUntilActionBuilder builder = new StandalonePriceSetValidFromAndUntilActionBuilder(); 108 builder.validFrom = template.getValidFrom(); 109 builder.validUntil = template.getValidUntil(); 110 return builder; 111 } 112 113}