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