1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: google/type/timeofday.proto
3
4package google_type
5
6import (
7	fmt "fmt"
8	proto "github.com/gogo/protobuf/proto"
9	io "io"
10	math "math"
11	math_bits "math/bits"
12	reflect "reflect"
13	strings "strings"
14)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
26
27// Represents a time of day. The date and time zone are either not significant
28// or are specified elsewhere. An API may choose to allow leap seconds. Related
29// types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`.
30type TimeOfDay struct {
31	// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
32	// to allow the value "24:00:00" for scenarios like business closing time.
33	Hours int32 `protobuf:"varint,1,opt,name=hours,proto3" json:"hours,omitempty"`
34	// Minutes of hour of day. Must be from 0 to 59.
35	Minutes int32 `protobuf:"varint,2,opt,name=minutes,proto3" json:"minutes,omitempty"`
36	// Seconds of minutes of the time. Must normally be from 0 to 59. An API may
37	// allow the value 60 if it allows leap-seconds.
38	Seconds int32 `protobuf:"varint,3,opt,name=seconds,proto3" json:"seconds,omitempty"`
39	// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
40	Nanos int32 `protobuf:"varint,4,opt,name=nanos,proto3" json:"nanos,omitempty"`
41}
42
43func (m *TimeOfDay) Reset()      { *m = TimeOfDay{} }
44func (*TimeOfDay) ProtoMessage() {}
45func (*TimeOfDay) Descriptor() ([]byte, []int) {
46	return fileDescriptor_6c354ab94588cebb, []int{0}
47}
48func (m *TimeOfDay) XXX_Unmarshal(b []byte) error {
49	return m.Unmarshal(b)
50}
51func (m *TimeOfDay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
52	if deterministic {
53		return xxx_messageInfo_TimeOfDay.Marshal(b, m, deterministic)
54	} else {
55		b = b[:cap(b)]
56		n, err := m.MarshalToSizedBuffer(b)
57		if err != nil {
58			return nil, err
59		}
60		return b[:n], nil
61	}
62}
63func (m *TimeOfDay) XXX_Merge(src proto.Message) {
64	xxx_messageInfo_TimeOfDay.Merge(m, src)
65}
66func (m *TimeOfDay) XXX_Size() int {
67	return m.Size()
68}
69func (m *TimeOfDay) XXX_DiscardUnknown() {
70	xxx_messageInfo_TimeOfDay.DiscardUnknown(m)
71}
72
73var xxx_messageInfo_TimeOfDay proto.InternalMessageInfo
74
75func (m *TimeOfDay) GetHours() int32 {
76	if m != nil {
77		return m.Hours
78	}
79	return 0
80}
81
82func (m *TimeOfDay) GetMinutes() int32 {
83	if m != nil {
84		return m.Minutes
85	}
86	return 0
87}
88
89func (m *TimeOfDay) GetSeconds() int32 {
90	if m != nil {
91		return m.Seconds
92	}
93	return 0
94}
95
96func (m *TimeOfDay) GetNanos() int32 {
97	if m != nil {
98		return m.Nanos
99	}
100	return 0
101}
102
103func init() {
104	proto.RegisterType((*TimeOfDay)(nil), "google.type.TimeOfDay")
105}
106
107func init() { proto.RegisterFile("google/type/timeofday.proto", fileDescriptor_6c354ab94588cebb) }
108
109var fileDescriptor_6c354ab94588cebb = []byte{
110	// 224 bytes of a gzipped FileDescriptorProto
111	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
112	0xcf, 0x49, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0xc9, 0xcc, 0x4d, 0xcd, 0x4f, 0x4b, 0x49,
113	0xac, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x48, 0xea, 0x81, 0x24, 0x95, 0xb2,
114	0xb9, 0x38, 0x43, 0x32, 0x73, 0x53, 0xfd, 0xd3, 0x5c, 0x12, 0x2b, 0x85, 0x44, 0xb8, 0x58, 0x33,
115	0xf2, 0x4b, 0x8b, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, 0x20, 0x1c, 0x21, 0x09, 0x2e,
116	0xf6, 0xdc, 0xcc, 0xbc, 0xd2, 0x92, 0xd4, 0x62, 0x09, 0x26, 0xb0, 0x38, 0x8c, 0x0b, 0x92, 0x29,
117	0x4e, 0x4d, 0xce, 0xcf, 0x4b, 0x29, 0x96, 0x60, 0x86, 0xc8, 0x40, 0xb9, 0x20, 0x93, 0xf2, 0x12,
118	0xf3, 0xf2, 0x8b, 0x25, 0x58, 0x20, 0x26, 0x81, 0x39, 0x4e, 0x09, 0x17, 0x1e, 0xca, 0x31, 0xdc,
119	0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18,
120	0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x17, 0x8f, 0xe4,
121	0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f,
122	0xe5, 0x18, 0xb8, 0xf8, 0x93, 0xf3, 0x73, 0xf5, 0x90, 0xdc, 0xec, 0xc4, 0x07, 0x77, 0x71, 0x00,
123	0xc8, 0x43, 0x01, 0x8c, 0x3f, 0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x87, 0x04, 0x24, 0xb1, 0x81,
124	0xbd, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x85, 0xe9, 0xb8, 0x71, 0x01, 0x01, 0x00, 0x00,
125}
126
127func (this *TimeOfDay) Equal(that interface{}) bool {
128	if that == nil {
129		return this == nil
130	}
131
132	that1, ok := that.(*TimeOfDay)
133	if !ok {
134		that2, ok := that.(TimeOfDay)
135		if ok {
136			that1 = &that2
137		} else {
138			return false
139		}
140	}
141	if that1 == nil {
142		return this == nil
143	} else if this == nil {
144		return false
145	}
146	if this.Hours != that1.Hours {
147		return false
148	}
149	if this.Minutes != that1.Minutes {
150		return false
151	}
152	if this.Seconds != that1.Seconds {
153		return false
154	}
155	if this.Nanos != that1.Nanos {
156		return false
157	}
158	return true
159}
160func (this *TimeOfDay) GoString() string {
161	if this == nil {
162		return "nil"
163	}
164	s := make([]string, 0, 8)
165	s = append(s, "&google_type.TimeOfDay{")
166	s = append(s, "Hours: "+fmt.Sprintf("%#v", this.Hours)+",\n")
167	s = append(s, "Minutes: "+fmt.Sprintf("%#v", this.Minutes)+",\n")
168	s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n")
169	s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n")
170	s = append(s, "}")
171	return strings.Join(s, "")
172}
173func valueToGoStringTimeofday(v interface{}, typ string) string {
174	rv := reflect.ValueOf(v)
175	if rv.IsNil() {
176		return "nil"
177	}
178	pv := reflect.Indirect(rv).Interface()
179	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
180}
181func (m *TimeOfDay) Marshal() (dAtA []byte, err error) {
182	size := m.Size()
183	dAtA = make([]byte, size)
184	n, err := m.MarshalToSizedBuffer(dAtA[:size])
185	if err != nil {
186		return nil, err
187	}
188	return dAtA[:n], nil
189}
190
191func (m *TimeOfDay) MarshalTo(dAtA []byte) (int, error) {
192	size := m.Size()
193	return m.MarshalToSizedBuffer(dAtA[:size])
194}
195
196func (m *TimeOfDay) MarshalToSizedBuffer(dAtA []byte) (int, error) {
197	i := len(dAtA)
198	_ = i
199	var l int
200	_ = l
201	if m.Nanos != 0 {
202		i = encodeVarintTimeofday(dAtA, i, uint64(m.Nanos))
203		i--
204		dAtA[i] = 0x20
205	}
206	if m.Seconds != 0 {
207		i = encodeVarintTimeofday(dAtA, i, uint64(m.Seconds))
208		i--
209		dAtA[i] = 0x18
210	}
211	if m.Minutes != 0 {
212		i = encodeVarintTimeofday(dAtA, i, uint64(m.Minutes))
213		i--
214		dAtA[i] = 0x10
215	}
216	if m.Hours != 0 {
217		i = encodeVarintTimeofday(dAtA, i, uint64(m.Hours))
218		i--
219		dAtA[i] = 0x8
220	}
221	return len(dAtA) - i, nil
222}
223
224func encodeVarintTimeofday(dAtA []byte, offset int, v uint64) int {
225	offset -= sovTimeofday(v)
226	base := offset
227	for v >= 1<<7 {
228		dAtA[offset] = uint8(v&0x7f | 0x80)
229		v >>= 7
230		offset++
231	}
232	dAtA[offset] = uint8(v)
233	return base
234}
235func (m *TimeOfDay) Size() (n int) {
236	if m == nil {
237		return 0
238	}
239	var l int
240	_ = l
241	if m.Hours != 0 {
242		n += 1 + sovTimeofday(uint64(m.Hours))
243	}
244	if m.Minutes != 0 {
245		n += 1 + sovTimeofday(uint64(m.Minutes))
246	}
247	if m.Seconds != 0 {
248		n += 1 + sovTimeofday(uint64(m.Seconds))
249	}
250	if m.Nanos != 0 {
251		n += 1 + sovTimeofday(uint64(m.Nanos))
252	}
253	return n
254}
255
256func sovTimeofday(x uint64) (n int) {
257	return (math_bits.Len64(x|1) + 6) / 7
258}
259func sozTimeofday(x uint64) (n int) {
260	return sovTimeofday(uint64((x << 1) ^ uint64((int64(x) >> 63))))
261}
262func (this *TimeOfDay) String() string {
263	if this == nil {
264		return "nil"
265	}
266	s := strings.Join([]string{`&TimeOfDay{`,
267		`Hours:` + fmt.Sprintf("%v", this.Hours) + `,`,
268		`Minutes:` + fmt.Sprintf("%v", this.Minutes) + `,`,
269		`Seconds:` + fmt.Sprintf("%v", this.Seconds) + `,`,
270		`Nanos:` + fmt.Sprintf("%v", this.Nanos) + `,`,
271		`}`,
272	}, "")
273	return s
274}
275func valueToStringTimeofday(v interface{}) string {
276	rv := reflect.ValueOf(v)
277	if rv.IsNil() {
278		return "nil"
279	}
280	pv := reflect.Indirect(rv).Interface()
281	return fmt.Sprintf("*%v", pv)
282}
283func (m *TimeOfDay) Unmarshal(dAtA []byte) error {
284	l := len(dAtA)
285	iNdEx := 0
286	for iNdEx < l {
287		preIndex := iNdEx
288		var wire uint64
289		for shift := uint(0); ; shift += 7 {
290			if shift >= 64 {
291				return ErrIntOverflowTimeofday
292			}
293			if iNdEx >= l {
294				return io.ErrUnexpectedEOF
295			}
296			b := dAtA[iNdEx]
297			iNdEx++
298			wire |= uint64(b&0x7F) << shift
299			if b < 0x80 {
300				break
301			}
302		}
303		fieldNum := int32(wire >> 3)
304		wireType := int(wire & 0x7)
305		if wireType == 4 {
306			return fmt.Errorf("proto: TimeOfDay: wiretype end group for non-group")
307		}
308		if fieldNum <= 0 {
309			return fmt.Errorf("proto: TimeOfDay: illegal tag %d (wire type %d)", fieldNum, wire)
310		}
311		switch fieldNum {
312		case 1:
313			if wireType != 0 {
314				return fmt.Errorf("proto: wrong wireType = %d for field Hours", wireType)
315			}
316			m.Hours = 0
317			for shift := uint(0); ; shift += 7 {
318				if shift >= 64 {
319					return ErrIntOverflowTimeofday
320				}
321				if iNdEx >= l {
322					return io.ErrUnexpectedEOF
323				}
324				b := dAtA[iNdEx]
325				iNdEx++
326				m.Hours |= int32(b&0x7F) << shift
327				if b < 0x80 {
328					break
329				}
330			}
331		case 2:
332			if wireType != 0 {
333				return fmt.Errorf("proto: wrong wireType = %d for field Minutes", wireType)
334			}
335			m.Minutes = 0
336			for shift := uint(0); ; shift += 7 {
337				if shift >= 64 {
338					return ErrIntOverflowTimeofday
339				}
340				if iNdEx >= l {
341					return io.ErrUnexpectedEOF
342				}
343				b := dAtA[iNdEx]
344				iNdEx++
345				m.Minutes |= int32(b&0x7F) << shift
346				if b < 0x80 {
347					break
348				}
349			}
350		case 3:
351			if wireType != 0 {
352				return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType)
353			}
354			m.Seconds = 0
355			for shift := uint(0); ; shift += 7 {
356				if shift >= 64 {
357					return ErrIntOverflowTimeofday
358				}
359				if iNdEx >= l {
360					return io.ErrUnexpectedEOF
361				}
362				b := dAtA[iNdEx]
363				iNdEx++
364				m.Seconds |= int32(b&0x7F) << shift
365				if b < 0x80 {
366					break
367				}
368			}
369		case 4:
370			if wireType != 0 {
371				return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType)
372			}
373			m.Nanos = 0
374			for shift := uint(0); ; shift += 7 {
375				if shift >= 64 {
376					return ErrIntOverflowTimeofday
377				}
378				if iNdEx >= l {
379					return io.ErrUnexpectedEOF
380				}
381				b := dAtA[iNdEx]
382				iNdEx++
383				m.Nanos |= int32(b&0x7F) << shift
384				if b < 0x80 {
385					break
386				}
387			}
388		default:
389			iNdEx = preIndex
390			skippy, err := skipTimeofday(dAtA[iNdEx:])
391			if err != nil {
392				return err
393			}
394			if skippy < 0 {
395				return ErrInvalidLengthTimeofday
396			}
397			if (iNdEx + skippy) < 0 {
398				return ErrInvalidLengthTimeofday
399			}
400			if (iNdEx + skippy) > l {
401				return io.ErrUnexpectedEOF
402			}
403			iNdEx += skippy
404		}
405	}
406
407	if iNdEx > l {
408		return io.ErrUnexpectedEOF
409	}
410	return nil
411}
412func skipTimeofday(dAtA []byte) (n int, err error) {
413	l := len(dAtA)
414	iNdEx := 0
415	for iNdEx < l {
416		var wire uint64
417		for shift := uint(0); ; shift += 7 {
418			if shift >= 64 {
419				return 0, ErrIntOverflowTimeofday
420			}
421			if iNdEx >= l {
422				return 0, io.ErrUnexpectedEOF
423			}
424			b := dAtA[iNdEx]
425			iNdEx++
426			wire |= (uint64(b) & 0x7F) << shift
427			if b < 0x80 {
428				break
429			}
430		}
431		wireType := int(wire & 0x7)
432		switch wireType {
433		case 0:
434			for shift := uint(0); ; shift += 7 {
435				if shift >= 64 {
436					return 0, ErrIntOverflowTimeofday
437				}
438				if iNdEx >= l {
439					return 0, io.ErrUnexpectedEOF
440				}
441				iNdEx++
442				if dAtA[iNdEx-1] < 0x80 {
443					break
444				}
445			}
446			return iNdEx, nil
447		case 1:
448			iNdEx += 8
449			return iNdEx, nil
450		case 2:
451			var length int
452			for shift := uint(0); ; shift += 7 {
453				if shift >= 64 {
454					return 0, ErrIntOverflowTimeofday
455				}
456				if iNdEx >= l {
457					return 0, io.ErrUnexpectedEOF
458				}
459				b := dAtA[iNdEx]
460				iNdEx++
461				length |= (int(b) & 0x7F) << shift
462				if b < 0x80 {
463					break
464				}
465			}
466			if length < 0 {
467				return 0, ErrInvalidLengthTimeofday
468			}
469			iNdEx += length
470			if iNdEx < 0 {
471				return 0, ErrInvalidLengthTimeofday
472			}
473			return iNdEx, nil
474		case 3:
475			for {
476				var innerWire uint64
477				var start int = iNdEx
478				for shift := uint(0); ; shift += 7 {
479					if shift >= 64 {
480						return 0, ErrIntOverflowTimeofday
481					}
482					if iNdEx >= l {
483						return 0, io.ErrUnexpectedEOF
484					}
485					b := dAtA[iNdEx]
486					iNdEx++
487					innerWire |= (uint64(b) & 0x7F) << shift
488					if b < 0x80 {
489						break
490					}
491				}
492				innerWireType := int(innerWire & 0x7)
493				if innerWireType == 4 {
494					break
495				}
496				next, err := skipTimeofday(dAtA[start:])
497				if err != nil {
498					return 0, err
499				}
500				iNdEx = start + next
501				if iNdEx < 0 {
502					return 0, ErrInvalidLengthTimeofday
503				}
504			}
505			return iNdEx, nil
506		case 4:
507			return iNdEx, nil
508		case 5:
509			iNdEx += 4
510			return iNdEx, nil
511		default:
512			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
513		}
514	}
515	panic("unreachable")
516}
517
518var (
519	ErrInvalidLengthTimeofday = fmt.Errorf("proto: negative length found during unmarshaling")
520	ErrIntOverflowTimeofday   = fmt.Errorf("proto: integer overflow")
521)
522