genprotogoogle.golang.org/genproto/googleapis/type/date_time_range Index | Files

package date_time_range

import "google.golang.org/genproto/googleapis/type/date_time_range"

Index

Variables

var File_google_actions_type_datetime_range_proto protoreflect.FileDescriptor

Types

type DateTimeRange

type DateTimeRange struct {

	// DateTime at which the date range begins. If unset, the range has no
	// beginning bound.
	Start *datetime.DateTime `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	// DateTime at which the date range ends. If unset, the range has no ending
	// bound.
	End *datetime.DateTime `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

Represents a date and time range. This can represent:

When considering whether a DateTime falls within a DateTimeRange, the start of the range is inclusive and the end is exclusive.

While [google.type.DateTime][google.type.DateTime] allows zero years, DateTimeRange does not. Year must always be non-zero.

When both start and end are set, either both or neither must have a time_offset. When set, time_offset can be specified by either utc_offset or time_zone and must match for start and end, that is if start has utc_offset set then end must also have utc_offset set. The values of utc_offset or time_zone need not be the same for start and end.

When both start and end are set, start must be chronologically less than or equal to end. When start and end are equal, the range is empty.

The semantics of start and end are the same as those of [google.type.DateTime][google.type.DateTime].

func (*DateTimeRange) Descriptor

func (*DateTimeRange) Descriptor() ([]byte, []int)

Deprecated: Use DateTimeRange.ProtoReflect.Descriptor instead.

func (*DateTimeRange) GetEnd

func (x *DateTimeRange) GetEnd() *datetime.DateTime

func (*DateTimeRange) GetStart

func (x *DateTimeRange) GetStart() *datetime.DateTime

func (*DateTimeRange) ProtoMessage

func (*DateTimeRange) ProtoMessage()

func (*DateTimeRange) ProtoReflect

func (x *DateTimeRange) ProtoReflect() protoreflect.Message

func (*DateTimeRange) Reset

func (x *DateTimeRange) Reset()

func (*DateTimeRange) String

func (x *DateTimeRange) String() string

Source Files

datetime_range.pb.go

Version
v0.0.0-20250219182151-9fdb1cabc7b2 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.