001
002package com.commercetools.api.models.payment;
003
004import java.util.*;
005
006import io.vrap.rmf.base.client.Builder;
007import io.vrap.rmf.base.client.utils.Generated;
008
009/**
010 * PaymentChangeTransactionTimestampActionBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     PaymentChangeTransactionTimestampAction paymentChangeTransactionTimestampAction = PaymentChangeTransactionTimestampAction.builder()
016 *             .transactionId("{transactionId}")
017 *             .timestamp(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
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 PaymentChangeTransactionTimestampActionBuilder
024        implements Builder<PaymentChangeTransactionTimestampAction> {
025
026    private String transactionId;
027
028    private java.time.ZonedDateTime timestamp;
029
030    /**
031     *  <p>Unique identifier of the Transaction.</p>
032     * @param transactionId value to be set
033     * @return Builder
034     */
035
036    public PaymentChangeTransactionTimestampActionBuilder transactionId(final String transactionId) {
037        this.transactionId = transactionId;
038        return this;
039    }
040
041    /**
042     *  <p>Timestamp of the Transaction as reported by the payment service.</p>
043     * @param timestamp value to be set
044     * @return Builder
045     */
046
047    public PaymentChangeTransactionTimestampActionBuilder timestamp(final java.time.ZonedDateTime timestamp) {
048        this.timestamp = timestamp;
049        return this;
050    }
051
052    /**
053     *  <p>Unique identifier of the Transaction.</p>
054     * @return transactionId
055     */
056
057    public String getTransactionId() {
058        return this.transactionId;
059    }
060
061    /**
062     *  <p>Timestamp of the Transaction as reported by the payment service.</p>
063     * @return timestamp
064     */
065
066    public java.time.ZonedDateTime getTimestamp() {
067        return this.timestamp;
068    }
069
070    /**
071     * builds PaymentChangeTransactionTimestampAction with checking for non-null required values
072     * @return PaymentChangeTransactionTimestampAction
073     */
074    public PaymentChangeTransactionTimestampAction build() {
075        Objects.requireNonNull(transactionId,
076            PaymentChangeTransactionTimestampAction.class + ": transactionId is missing");
077        Objects.requireNonNull(timestamp, PaymentChangeTransactionTimestampAction.class + ": timestamp is missing");
078        return new PaymentChangeTransactionTimestampActionImpl(transactionId, timestamp);
079    }
080
081    /**
082     * builds PaymentChangeTransactionTimestampAction without checking for non-null required values
083     * @return PaymentChangeTransactionTimestampAction
084     */
085    public PaymentChangeTransactionTimestampAction buildUnchecked() {
086        return new PaymentChangeTransactionTimestampActionImpl(transactionId, timestamp);
087    }
088
089    /**
090     * factory method for an instance of PaymentChangeTransactionTimestampActionBuilder
091     * @return builder
092     */
093    public static PaymentChangeTransactionTimestampActionBuilder of() {
094        return new PaymentChangeTransactionTimestampActionBuilder();
095    }
096
097    /**
098     * create builder for PaymentChangeTransactionTimestampAction instance
099     * @param template instance with prefilled values for the builder
100     * @return builder
101     */
102    public static PaymentChangeTransactionTimestampActionBuilder of(
103            final PaymentChangeTransactionTimestampAction template) {
104        PaymentChangeTransactionTimestampActionBuilder builder = new PaymentChangeTransactionTimestampActionBuilder();
105        builder.transactionId = template.getTransactionId();
106        builder.timestamp = template.getTimestamp();
107        return builder;
108    }
109
110}