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     */
032
033    public ImageSearchConfigResponseBuilder status(
034            final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) {
035        this.status = status;
036        return this;
037    }
038
039    /**
040     *
041     */
042
043    public ImageSearchConfigResponseBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) {
044        this.lastModifiedAt = lastModifiedAt;
045        return this;
046    }
047
048    public com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus getStatus() {
049        return this.status;
050    }
051
052    public java.time.ZonedDateTime getLastModifiedAt() {
053        return this.lastModifiedAt;
054    }
055
056    public ImageSearchConfigResponse build() {
057        Objects.requireNonNull(status, ImageSearchConfigResponse.class + ": status is missing");
058        Objects.requireNonNull(lastModifiedAt, ImageSearchConfigResponse.class + ": lastModifiedAt is missing");
059        return new ImageSearchConfigResponseImpl(status, lastModifiedAt);
060    }
061
062    /**
063     * builds ImageSearchConfigResponse without checking for non null required values
064     */
065    public ImageSearchConfigResponse buildUnchecked() {
066        return new ImageSearchConfigResponseImpl(status, lastModifiedAt);
067    }
068
069    public static ImageSearchConfigResponseBuilder of() {
070        return new ImageSearchConfigResponseBuilder();
071    }
072
073    public static ImageSearchConfigResponseBuilder of(final ImageSearchConfigResponse template) {
074        ImageSearchConfigResponseBuilder builder = new ImageSearchConfigResponseBuilder();
075        builder.status = template.getStatus();
076        builder.lastModifiedAt = template.getLastModifiedAt();
077        return builder;
078    }
079
080}