Debian Codegraph @

googleapis/type/date/date.pb.go

raw
1 // Copyright 2026 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.26.0
18 // protoc v4.24.4
19 // source: google/type/date.proto
20
21 package date
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38 // Represents a whole or partial calendar date, such as a birthday. The time of
39 // day and time zone are either specified elsewhere or are insignificant. The
40 // date is relative to the Gregorian Calendar. This can represent one of the
41 // following:
42 //
43 // - A full date, with non-zero year, month, and day values.
44 // - A month and day, with a zero year (for example, an anniversary).
45 // - A year on its own, with a zero month and a zero day.
46 // - A year and month, with a zero day (for example, a credit card expiration
47 // date).
48 //
49 // Related types:
50 //
51 // * [google.type.TimeOfDay][google.type.TimeOfDay]
52 // * [google.type.DateTime][google.type.DateTime]
53 // * [google.protobuf.Timestamp][google.protobuf.Timestamp]
54 type Date struct {
55 state protoimpl.MessageState
56 sizeCache protoimpl.SizeCache
57 unknownFields protoimpl.UnknownFields
58
59 // Year of the date. Must be from 1 to 9999, or 0 to specify a date without
60 // a year.
61 Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
62 // Month of a year. Must be from 1 to 12, or 0 to specify a year without a
63 // month and day.
64 Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
65 // Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
66 // to specify a year by itself or a year and month where the day isn't
67 // significant.
68 Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
69 }
70
71 func (x *Date) Reset() {
72 *x = Date{}
73 if protoimpl.UnsafeEnabled {
74 mi := &file_google_type_date_proto_msgTypes[0]
75 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
76 ms.StoreMessageInfo(mi)
77 }
78 }
79
80 func (x *Date) String() string {
81 return protoimpl.X.MessageStringOf(x)
82 }
83
84 func (*Date) ProtoMessage() {}
85
86 func (x *Date) ProtoReflect() protoreflect.Message {
87 mi := &file_google_type_date_proto_msgTypes[0]
88 if protoimpl.UnsafeEnabled && x != nil {
89 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
90 if ms.LoadMessageInfo() == nil {
91 ms.StoreMessageInfo(mi)
92 }
93 return ms
94 }
95 return mi.MessageOf(x)
96 }
97
98 // Deprecated: Use Date.ProtoReflect.Descriptor instead.
99 func (*Date) Descriptor() ([]byte, []int) {
100 return file_google_type_date_proto_rawDescGZIP(), []int{0}
101 }
102
103 func (x *Date) GetYear() int32 {
104 if x != nil {
105 return x.Year
106 }
107 return 0
108 }
109
110 func (x *Date) GetMonth() int32 {
111 if x != nil {
112 return x.Month
113 }
114 return 0
115 }
116
117 func (x *Date) GetDay() int32 {
118 if x != nil {
119 return x.Day
120 }
121 return 0
122 }
123
124 var File_google_type_date_proto protoreflect.FileDescriptor
125
126 var file_google_type_date_proto_rawDesc = []byte{
127 0x0a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61,
128 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
129 0x2e, 0x74, 0x79, 0x70, 0x65, 0x22, 0x42, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a,
130 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61,
131 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
132 0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x03,
133 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x42, 0x5a, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
134 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x44, 0x61,
135 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
136 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e,
137 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
138 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x3b, 0x64, 0x61, 0x74, 0x65, 0xa2,
139 0x02, 0x03, 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
140 }
141
142 var (
143 file_google_type_date_proto_rawDescOnce sync.Once
144 file_google_type_date_proto_rawDescData = file_google_type_date_proto_rawDesc
145 )
146
147 func file_google_type_date_proto_rawDescGZIP() []byte {
148 file_google_type_date_proto_rawDescOnce.Do(func() {
149 file_google_type_date_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_date_proto_rawDescData)
150 })
151 return file_google_type_date_proto_rawDescData
152 }
153
154 var file_google_type_date_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
155 var file_google_type_date_proto_goTypes = []interface{}{
156 (*Date)(nil), // 0: google.type.Date
157 }
158 var file_google_type_date_proto_depIdxs = []int32{
159 0, // [0:0] is the sub-list for method output_type
160 0, // [0:0] is the sub-list for method input_type
161 0, // [0:0] is the sub-list for extension type_name
162 0, // [0:0] is the sub-list for extension extendee
163 0, // [0:0] is the sub-list for field type_name
164 }
165
166 func init() { file_google_type_date_proto_init() }
167 func file_google_type_date_proto_init() {
168 if File_google_type_date_proto != nil {
169 return
170 }
171 if !protoimpl.UnsafeEnabled {
172 file_google_type_date_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
173 switch v := v.(*Date); i {
174 case 0:
175 return &v.state
176 case 1:
177 return &v.sizeCache
178 case 2:
179 return &v.unknownFields
180 default:
181 return nil
182 }
183 }
184 }
185 type x struct{}
186 out := protoimpl.TypeBuilder{
187 File: protoimpl.DescBuilder{
188 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
189 RawDescriptor: file_google_type_date_proto_rawDesc,
190 NumEnums: 0,
191 NumMessages: 1,
192 NumExtensions: 0,
193 NumServices: 0,
194 },
195 GoTypes: file_google_type_date_proto_goTypes,
196 DependencyIndexes: file_google_type_date_proto_depIdxs,
197 MessageInfos: file_google_type_date_proto_msgTypes,
198 }.Build()
199 File_google_type_date_proto = out.File
200 file_google_type_date_proto_rawDesc = nil
201 file_google_type_date_proto_goTypes = nil
202 file_google_type_date_proto_depIdxs = nil
203 }