1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Code generated by protoc-gen-go. DO NOT EDIT.
16// versions:
17// 	protoc-gen-go v1.25.0
18// 	protoc        v3.13.0
19// source: google/type/datetime.proto
20
21package datetime
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	proto "github.com/golang/protobuf/proto"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30	durationpb "google.golang.org/protobuf/types/known/durationpb"
31)
32
33const (
34	// Verify that this generated code is sufficiently up-to-date.
35	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
36	// Verify that runtime/protoimpl is sufficiently up-to-date.
37	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
38)
39
40// This is a compile-time assertion that a sufficiently up-to-date version
41// of the legacy proto package is being used.
42const _ = proto.ProtoPackageIsVersion4
43
44// Represents civil time (or occasionally physical time).
45//
46// This type can represent a civil time in one of a few possible ways:
47//
48//  * When utc_offset is set and time_zone is unset: a civil time on a calendar
49//    day with a particular offset from UTC.
50//  * When time_zone is set and utc_offset is unset: a civil time on a calendar
51//    day in a particular time zone.
52//  * When neither time_zone nor utc_offset is set: a civil time on a calendar
53//    day in local time.
54//
55// The date is relative to the Proleptic Gregorian Calendar.
56//
57// If year is 0, the DateTime is considered not to have a specific year. month
58// and day must have valid, non-zero values.
59//
60// This type may also be used to represent a physical time if all the date and
61// time fields are set and either case of the `time_offset` oneof is set.
62// Consider using `Timestamp` message for physical time instead. If your use
63// case also would like to store the user's timezone, that can be done in
64// another field.
65//
66// This type is more flexible than some applications may want. Make sure to
67// document and validate your application's limitations.
68type DateTime struct {
69	state         protoimpl.MessageState
70	sizeCache     protoimpl.SizeCache
71	unknownFields protoimpl.UnknownFields
72
73	// Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
74	// datetime without a year.
75	Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
76	// Required. Month of year. Must be from 1 to 12.
77	Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
78	// Required. Day of month. Must be from 1 to 31 and valid for the year and
79	// month.
80	Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
81	// Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
82	// may choose to allow the value "24:00:00" for scenarios like business
83	// closing time.
84	Hours int32 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"`
85	// Required. Minutes of hour of day. Must be from 0 to 59.
86	Minutes int32 `protobuf:"varint,5,opt,name=minutes,proto3" json:"minutes,omitempty"`
87	// Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
88	// API may allow the value 60 if it allows leap-seconds.
89	Seconds int32 `protobuf:"varint,6,opt,name=seconds,proto3" json:"seconds,omitempty"`
90	// Required. Fractions of seconds in nanoseconds. Must be from 0 to
91	// 999,999,999.
92	Nanos int32 `protobuf:"varint,7,opt,name=nanos,proto3" json:"nanos,omitempty"`
93	// Optional. Specifies either the UTC offset or the time zone of the DateTime.
94	// Choose carefully between them, considering that time zone data may change
95	// in the future (for example, a country modifies their DST start/end dates,
96	// and future DateTimes in the affected range had already been stored).
97	// If omitted, the DateTime is considered to be in local time.
98	//
99	// Types that are assignable to TimeOffset:
100	//	*DateTime_UtcOffset
101	//	*DateTime_TimeZone
102	TimeOffset isDateTime_TimeOffset `protobuf_oneof:"time_offset"`
103}
104
105func (x *DateTime) Reset() {
106	*x = DateTime{}
107	if protoimpl.UnsafeEnabled {
108		mi := &file_google_type_datetime_proto_msgTypes[0]
109		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
110		ms.StoreMessageInfo(mi)
111	}
112}
113
114func (x *DateTime) String() string {
115	return protoimpl.X.MessageStringOf(x)
116}
117
118func (*DateTime) ProtoMessage() {}
119
120func (x *DateTime) ProtoReflect() protoreflect.Message {
121	mi := &file_google_type_datetime_proto_msgTypes[0]
122	if protoimpl.UnsafeEnabled && x != nil {
123		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
124		if ms.LoadMessageInfo() == nil {
125			ms.StoreMessageInfo(mi)
126		}
127		return ms
128	}
129	return mi.MessageOf(x)
130}
131
132// Deprecated: Use DateTime.ProtoReflect.Descriptor instead.
133func (*DateTime) Descriptor() ([]byte, []int) {
134	return file_google_type_datetime_proto_rawDescGZIP(), []int{0}
135}
136
137func (x *DateTime) GetYear() int32 {
138	if x != nil {
139		return x.Year
140	}
141	return 0
142}
143
144func (x *DateTime) GetMonth() int32 {
145	if x != nil {
146		return x.Month
147	}
148	return 0
149}
150
151func (x *DateTime) GetDay() int32 {
152	if x != nil {
153		return x.Day
154	}
155	return 0
156}
157
158func (x *DateTime) GetHours() int32 {
159	if x != nil {
160		return x.Hours
161	}
162	return 0
163}
164
165func (x *DateTime) GetMinutes() int32 {
166	if x != nil {
167		return x.Minutes
168	}
169	return 0
170}
171
172func (x *DateTime) GetSeconds() int32 {
173	if x != nil {
174		return x.Seconds
175	}
176	return 0
177}
178
179func (x *DateTime) GetNanos() int32 {
180	if x != nil {
181		return x.Nanos
182	}
183	return 0
184}
185
186func (m *DateTime) GetTimeOffset() isDateTime_TimeOffset {
187	if m != nil {
188		return m.TimeOffset
189	}
190	return nil
191}
192
193func (x *DateTime) GetUtcOffset() *durationpb.Duration {
194	if x, ok := x.GetTimeOffset().(*DateTime_UtcOffset); ok {
195		return x.UtcOffset
196	}
197	return nil
198}
199
200func (x *DateTime) GetTimeZone() *TimeZone {
201	if x, ok := x.GetTimeOffset().(*DateTime_TimeZone); ok {
202		return x.TimeZone
203	}
204	return nil
205}
206
207type isDateTime_TimeOffset interface {
208	isDateTime_TimeOffset()
209}
210
211type DateTime_UtcOffset struct {
212	// UTC offset. Must be whole seconds, between -18 hours and +18 hours.
213	// For example, a UTC offset of -4:00 would be represented as
214	// { seconds: -14400 }.
215	UtcOffset *durationpb.Duration `protobuf:"bytes,8,opt,name=utc_offset,json=utcOffset,proto3,oneof"`
216}
217
218type DateTime_TimeZone struct {
219	// Time zone.
220	TimeZone *TimeZone `protobuf:"bytes,9,opt,name=time_zone,json=timeZone,proto3,oneof"`
221}
222
223func (*DateTime_UtcOffset) isDateTime_TimeOffset() {}
224
225func (*DateTime_TimeZone) isDateTime_TimeOffset() {}
226
227// Represents a time zone from the
228// [IANA Time Zone Database](https://www.iana.org/time-zones).
229type TimeZone struct {
230	state         protoimpl.MessageState
231	sizeCache     protoimpl.SizeCache
232	unknownFields protoimpl.UnknownFields
233
234	// IANA Time Zone Database time zone, e.g. "America/New_York".
235	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
236	// Optional. IANA Time Zone Database version number, e.g. "2019a".
237	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
238}
239
240func (x *TimeZone) Reset() {
241	*x = TimeZone{}
242	if protoimpl.UnsafeEnabled {
243		mi := &file_google_type_datetime_proto_msgTypes[1]
244		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
245		ms.StoreMessageInfo(mi)
246	}
247}
248
249func (x *TimeZone) String() string {
250	return protoimpl.X.MessageStringOf(x)
251}
252
253func (*TimeZone) ProtoMessage() {}
254
255func (x *TimeZone) ProtoReflect() protoreflect.Message {
256	mi := &file_google_type_datetime_proto_msgTypes[1]
257	if protoimpl.UnsafeEnabled && x != nil {
258		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
259		if ms.LoadMessageInfo() == nil {
260			ms.StoreMessageInfo(mi)
261		}
262		return ms
263	}
264	return mi.MessageOf(x)
265}
266
267// Deprecated: Use TimeZone.ProtoReflect.Descriptor instead.
268func (*TimeZone) Descriptor() ([]byte, []int) {
269	return file_google_type_datetime_proto_rawDescGZIP(), []int{1}
270}
271
272func (x *TimeZone) GetId() string {
273	if x != nil {
274		return x.Id
275	}
276	return ""
277}
278
279func (x *TimeZone) GetVersion() string {
280	if x != nil {
281		return x.Version
282	}
283	return ""
284}
285
286var File_google_type_datetime_proto protoreflect.FileDescriptor
287
288var file_google_type_datetime_proto_rawDesc = []byte{
289	0x0a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61,
290	0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f,
291	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
292	0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74,
293	0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x02, 0x0a, 0x08, 0x44, 0x61,
294	0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x01,
295	0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f,
296	0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
297	0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64,
298	0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
299	0x05, 0x52, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x75,
300	0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74,
301	0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20,
302	0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05,
303	0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e,
304	0x6f, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
305	0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
306	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
307	0x6e, 0x48, 0x00, 0x52, 0x09, 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x34,
308	0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
309	0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
310	0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65,
311	0x5a, 0x6f, 0x6e, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66,
312	0x73, 0x65, 0x74, 0x22, 0x34, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12,
313	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
314	0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
315	0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
316	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x44, 0x61,
317	0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67,
318	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,
319	0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
320	0x61, 0x70, 0x69, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69,
321	0x6d, 0x65, 0x3b, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0xf8, 0x01, 0x01, 0xa2, 0x02,
322	0x03, 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
323}
324
325var (
326	file_google_type_datetime_proto_rawDescOnce sync.Once
327	file_google_type_datetime_proto_rawDescData = file_google_type_datetime_proto_rawDesc
328)
329
330func file_google_type_datetime_proto_rawDescGZIP() []byte {
331	file_google_type_datetime_proto_rawDescOnce.Do(func() {
332		file_google_type_datetime_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_datetime_proto_rawDescData)
333	})
334	return file_google_type_datetime_proto_rawDescData
335}
336
337var file_google_type_datetime_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
338var file_google_type_datetime_proto_goTypes = []interface{}{
339	(*DateTime)(nil),            // 0: google.type.DateTime
340	(*TimeZone)(nil),            // 1: google.type.TimeZone
341	(*durationpb.Duration)(nil), // 2: google.protobuf.Duration
342}
343var file_google_type_datetime_proto_depIdxs = []int32{
344	2, // 0: google.type.DateTime.utc_offset:type_name -> google.protobuf.Duration
345	1, // 1: google.type.DateTime.time_zone:type_name -> google.type.TimeZone
346	2, // [2:2] is the sub-list for method output_type
347	2, // [2:2] is the sub-list for method input_type
348	2, // [2:2] is the sub-list for extension type_name
349	2, // [2:2] is the sub-list for extension extendee
350	0, // [0:2] is the sub-list for field type_name
351}
352
353func init() { file_google_type_datetime_proto_init() }
354func file_google_type_datetime_proto_init() {
355	if File_google_type_datetime_proto != nil {
356		return
357	}
358	if !protoimpl.UnsafeEnabled {
359		file_google_type_datetime_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
360			switch v := v.(*DateTime); i {
361			case 0:
362				return &v.state
363			case 1:
364				return &v.sizeCache
365			case 2:
366				return &v.unknownFields
367			default:
368				return nil
369			}
370		}
371		file_google_type_datetime_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
372			switch v := v.(*TimeZone); i {
373			case 0:
374				return &v.state
375			case 1:
376				return &v.sizeCache
377			case 2:
378				return &v.unknownFields
379			default:
380				return nil
381			}
382		}
383	}
384	file_google_type_datetime_proto_msgTypes[0].OneofWrappers = []interface{}{
385		(*DateTime_UtcOffset)(nil),
386		(*DateTime_TimeZone)(nil),
387	}
388	type x struct{}
389	out := protoimpl.TypeBuilder{
390		File: protoimpl.DescBuilder{
391			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
392			RawDescriptor: file_google_type_datetime_proto_rawDesc,
393			NumEnums:      0,
394			NumMessages:   2,
395			NumExtensions: 0,
396			NumServices:   0,
397		},
398		GoTypes:           file_google_type_datetime_proto_goTypes,
399		DependencyIndexes: file_google_type_datetime_proto_depIdxs,
400		MessageInfos:      file_google_type_datetime_proto_msgTypes,
401	}.Build()
402	File_google_type_datetime_proto = out.File
403	file_google_type_datetime_proto_rawDesc = nil
404	file_google_type_datetime_proto_goTypes = nil
405	file_google_type_datetime_proto_depIdxs = nil
406}
407