/*
 * Copyright 2019, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.time.temporal;

import com.google.protobuf.Timestamp;
import io.spine.annotation.Internal;

@Internal
public final class TimestampTemporal implements Temporal<TimestampTemporal> {

    private final Timestamp value;

    public TimestampTemporal(Timestamp value) {
        this.value = value;
    }

    @Override
    public Timestamp toTimestamp() {
        return value;
    }
}

@@ -1119,141 +1119,681 @@
 l;%0A%0A
-@Internal%0Apublic final class TimestampTemporal implements Temporal%3CTimestampTemporal%3E %7B%0A%0A    private final Timestamp value;%0A%0A    publ
+import static com.google.common.base.Preconditions.checkNotNull;%0Aimport static com.google.protobuf.util.Timestamps.checkValid;%0A%0A/**%0A * An implementation of %7B@link Temporal%7D for the Protobuf %7B@link Timestamp%7D.%0A */%0A@Internal%0Apublic final class TimestampTemporal implements Temporal%3CTimestampTemporal%3E %7B%0A%0A    private final Timestamp value;%0A%0A    private TimestampTemporal(Timestamp value) %7B%0A        this.value = value;%0A    %7D%0A%0A    /**%0A     * Creates a new instance with the given %7B@code Timestamp%7D.%0A     *%0A     * %3Cp%3EThe given value must be valid in terms of %7B@code Timestamps.checkValid(..)%7D. Otherwise,%0A     * as %7B@code IllegalStateException%7D is thrown.%0A     */%0A    public stat
 ic T
@@ -1800,32 +1800,37 @@
 imestampTemporal
+ from
 (Timestamp value
@@ -1841,34 +1841,107 @@
         
-this.value = 
+checkNotNull(value);%0A        checkValid(value);%0A        return new TimestampTemporal(
 value
+)
 ;%0A    %7D%0A

Document TimestampTemporal.