java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<Timestamp,Timestamp.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<Timestamp,Timestamp.Builder>
com.hedera.hashgraph.sdk.proto.Timestamp.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,TimestampOrBuilder,Cloneable
- Enclosing class:
Timestamp
public static final class Timestamp.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Timestamp,Timestamp.Builder>
implements TimestampOrBuilder
* An exact date and time.<br/> This is the same data structure as the Google protobuf Timestamp.proto. #### Additional Notes Useful information is present in comments on the [Google version](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto).Protobuf type
proto.Timestamp-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* The number of nanoseconds after the start of the second referenced in `seconds`.* The number of complete seconds since the start of the epoch.intgetNanos()* The number of nanoseconds after the start of the second referenced in `seconds`.long* The number of complete seconds since the start of the epoch.setNanos(int value) * The number of nanoseconds after the start of the second referenced in `seconds`.setSeconds(long value) * The number of complete seconds since the start of the epoch.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getSeconds
public long getSeconds()* The number of complete seconds since the start of the epoch. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.<br/> This value MUST be greater than 0.<br/> This value SHOULD be strictly greater than `946684800`.
int64 seconds = 1;- Specified by:
getSecondsin interfaceTimestampOrBuilder- Returns:
- The seconds.
-
setSeconds
* The number of complete seconds since the start of the epoch. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.<br/> This value MUST be greater than 0.<br/> This value SHOULD be strictly greater than `946684800`.
int64 seconds = 1;- Parameters:
value- The seconds to set.- Returns:
- This builder for chaining.
-
clearSeconds
* The number of complete seconds since the start of the epoch. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.<br/> This value MUST be greater than 0.<br/> This value SHOULD be strictly greater than `946684800`.
int64 seconds = 1;- Returns:
- This builder for chaining.
-
getNanos
public int getNanos()* The number of nanoseconds after the start of the second referenced in `seconds`. <p> This value MUST be greater than or equal to 0.<br/> This value MUST be strictly less than 1,000,000,000.
int32 nanos = 2;- Specified by:
getNanosin interfaceTimestampOrBuilder- Returns:
- The nanos.
-
setNanos
* The number of nanoseconds after the start of the second referenced in `seconds`. <p> This value MUST be greater than or equal to 0.<br/> This value MUST be strictly less than 1,000,000,000.
int32 nanos = 2;- Parameters:
value- The nanos to set.- Returns:
- This builder for chaining.
-
clearNanos
* The number of nanoseconds after the start of the second referenced in `seconds`. <p> This value MUST be greater than or equal to 0.<br/> This value MUST be strictly less than 1,000,000,000.
int32 nanos = 2;- Returns:
- This builder for chaining.
-