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