Represents a TimeRange.
Package
@google-cloud/retailConstructors
(constructor)(properties)
constructor(properties?: google.cloud.retail.v2.Condition.ITimeRange);
Constructs a new TimeRange.
Parameter | |
---|---|
Name | Description |
properties |
ITimeRange
Properties to set |
Properties
endTime
public endTime?: (google.protobuf.ITimestamp|null);
TimeRange endTime.
startTime
public startTime?: (google.protobuf.ITimestamp|null);
TimeRange startTime.
Methods
create(properties)
public static create(properties?: google.cloud.retail.v2.Condition.ITimeRange): google.cloud.retail.v2.Condition.TimeRange;
Creates a new TimeRange instance using the specified properties.
Parameter | |
---|---|
Name | Description |
properties |
ITimeRange
Properties to set |
Returns | |
---|---|
Type | Description |
TimeRange |
TimeRange instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2.Condition.TimeRange;
Decodes a TimeRange message from the specified reader or buffer.
Parameters | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
TimeRange |
TimeRange |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2.Condition.TimeRange;
Decodes a TimeRange message from the specified reader or buffer, length delimited.
Parameter | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
TimeRange |
TimeRange |
encode(message, writer)
public static encode(message: google.cloud.retail.v2.Condition.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified TimeRange message. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
ITimeRange
TimeRange message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.cloud.retail.v2.Condition.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified TimeRange message, length delimited. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
ITimeRange
TimeRange message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)