| 1 |
// Copyright 2025 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.26.0 |
| 19 |
// protoc v4.24.4 |
| 20 |
// source: google/actions/type/date_range.proto |
| 21 |
|
| 22 |
package date_range |
| 23 |
|
| 24 |
import ( |
| 25 |
reflect "reflect" |
| 26 |
sync "sync" |
| 27 |
|
| 28 |
date "google.golang.org/genproto/googleapis/type/date" |
| 29 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 30 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 31 |
) |
| 32 |
|
| 33 |
const ( |
| 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 |
// Represents a range based on whole or partial calendar dates, e.g. the |
| 41 |
// duration of a hotel reservation or the Common Era. This can represent: |
| 42 |
// |
| 43 |
// * A range between full dates, e.g. the duration of a hotel reservation |
| 44 |
// * A range between years, e.g. a historical era |
| 45 |
// * A range between year/month dates, e.g. the duration of a job on a resume |
| 46 |
// * A range beginning in a year, e.g. the Common Era |
| 47 |
// * A range ending on a specific date, e.g. the period of time before an event |
| 48 |
// |
| 49 |
// While [google.type.Date][google.type.Date] allows zero years, DateRange does not. Year must |
| 50 |
// always be non-zero. |
| 51 |
// |
| 52 |
// End cannot be chronologically before start. For example, if start has year |
| 53 |
// 2000, end cannot have year 1999. |
| 54 |
// |
| 55 |
// When both set, start and end must have exactly the same precision. That is, |
| 56 |
// they must have the same fields populated with non-zero values. For example, |
| 57 |
// if start specifies only year and month, then end must also specify only year |
| 58 |
// and month (but not day). |
| 59 |
// |
| 60 |
// The date range is inclusive. That is, the dates specified by start and end |
| 61 |
// are part of the date range. For example, the date January 1, 2000 falls |
| 62 |
// within any date with start or end equal to January 1, 2000. When determining |
| 63 |
// whether a date is inside a date range, the date should only be compared to |
| 64 |
// start and end when those values are set. |
| 65 |
// |
| 66 |
// When a date and date range are specified to different degrees of precision, |
| 67 |
// the rules for evaluating whether that date is inside the date range are as |
| 68 |
// follows: |
| 69 |
// |
| 70 |
// - When comparing the date to the start of the date range, unspecified months |
| 71 |
// should be replaced with 1, and unspecified days should be replaced with 1. |
| 72 |
// For example, the year 2000 is within the date range with start equal to |
| 73 |
// January 1, 2000 and no end. And the date January 1, 2000 is within the |
| 74 |
// date range with start equal to the year 2000 and no end. |
| 75 |
// |
| 76 |
// - When comparing the date to the end of the date range, unspecified months |
| 77 |
// should be replaced with 12, and unspecified days should be replaced with |
| 78 |
// the last valid day for the month/year. For example, the year 2000 is |
| 79 |
// within the date range with start equal to January 1, 1999 and end equal to |
| 80 |
// December 31, 2000. And the date December 31, 2001 is within the date range |
| 81 |
// with start equal to the year 2000 and end equal to the year 2001. |
| 82 |
// |
| 83 |
// The semantics of start and end are the same as those of [google.type.Date][google.type.Date], |
| 84 |
// except that year must always be non-zero in DateRange. |
| 85 |
type DateRange struct { |
| 86 |
state protoimpl.MessageState |
| 87 |
sizeCache protoimpl.SizeCache |
| 88 |
unknownFields protoimpl.UnknownFields |
| 89 |
|
| 90 |
// Date at which the date range begins. If unset, the date range has no |
| 91 |
// beginning bound. |
| 92 |
Start *date.Date `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` |
| 93 |
// Date at which the date range ends. If unset, the date range has no ending |
| 94 |
// bound. |
| 95 |
End *date.Date `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` |
| 96 |
} |
| 97 |
|
| 98 |
func (x *DateRange) Reset() { |
| 99 |
*x = DateRange{} |
| 100 |
if protoimpl.UnsafeEnabled { |
| 101 |
mi := &file_google_actions_type_date_range_proto_msgTypes[0] |
| 102 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 103 |
ms.StoreMessageInfo(mi) |
| 104 |
} |
| 105 |
} |
| 106 |
|
| 107 |
func (x *DateRange) String() string { |
| 108 |
return protoimpl.X.MessageStringOf(x) |
| 109 |
} |
| 110 |
|
| 111 |
func (*DateRange) ProtoMessage() {} |
| 112 |
|
| 113 |
func (x *DateRange) ProtoReflect() protoreflect.Message { |
| 114 |
mi := &file_google_actions_type_date_range_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 DateRange.ProtoReflect.Descriptor instead. |
| 126 |
func (*DateRange) Descriptor() ([]byte, []int) { |
| 127 |
return file_google_actions_type_date_range_proto_rawDescGZIP(), []int{0} |
| 128 |
} |
| 129 |
|
| 130 |
func (x *DateRange) GetStart() *date.Date { |
| 131 |
if x != nil { |
| 132 |
return x.Start |
| 133 |
} |
| 134 |
return nil |
| 135 |
} |
| 136 |
|
| 137 |
func (x *DateRange) GetEnd() *date.Date { |
| 138 |
if x != nil { |
| 139 |
return x.End |
| 140 |
} |
| 141 |
return nil |
| 142 |
} |
| 143 |
|
| 144 |
var File_google_actions_type_date_range_proto protoreflect.FileDescriptor |
| 145 |
|
| 146 |
var file_google_actions_type_date_range_proto_rawDesc = []byte{ |
| 147 |
0x0a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, |
| 148 |
0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, |
| 149 |
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, |
| 150 |
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x16, 0x67, 0x6f, 0x6f, |
| 151 |
0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, |
| 152 |
0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, |
| 153 |
0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, |
| 154 |
0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, |
| 155 |
0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x65, 0x6e, 0x64, |
| 156 |
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, |
| 157 |
0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x75, |
| 158 |
0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x74, |
| 159 |
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x44, 0x61, 0x74, 0x65, 0x52, |
| 160 |
0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x6f, 0x6f, |
| 161 |
0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, |
| 162 |
0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, |
| 163 |
0x69, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, |
| 164 |
0x67, 0x65, 0x3b, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0xa2, 0x02, 0x05, |
| 165 |
0x41, 0x4f, 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 166 |
} |
| 167 |
|
| 168 |
var ( |
| 169 |
file_google_actions_type_date_range_proto_rawDescOnce sync.Once |
| 170 |
file_google_actions_type_date_range_proto_rawDescData = file_google_actions_type_date_range_proto_rawDesc |
| 171 |
) |
| 172 |
|
| 173 |
func file_google_actions_type_date_range_proto_rawDescGZIP() []byte { |
| 174 |
file_google_actions_type_date_range_proto_rawDescOnce.Do(func() { |
| 175 |
file_google_actions_type_date_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_actions_type_date_range_proto_rawDescData) |
| 176 |
}) |
| 177 |
return file_google_actions_type_date_range_proto_rawDescData |
| 178 |
} |
| 179 |
|
| 180 |
var file_google_actions_type_date_range_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 181 |
var file_google_actions_type_date_range_proto_goTypes = []interface{}{ |
| 182 |
(*DateRange)(nil), // 0: google.actions.type.DateRange |
| 183 |
(*date.Date)(nil), // 1: google.type.Date |
| 184 |
} |
| 185 |
var file_google_actions_type_date_range_proto_depIdxs = []int32{ |
| 186 |
1, // 0: google.actions.type.DateRange.start:type_name -> google.type.Date |
| 187 |
1, // 1: google.actions.type.DateRange.end:type_name -> google.type.Date |
| 188 |
2, // [2:2] is the sub-list for method output_type |
| 189 |
2, // [2:2] is the sub-list for method input_type |
| 190 |
2, // [2:2] is the sub-list for extension type_name |
| 191 |
2, // [2:2] is the sub-list for extension extendee |
| 192 |
0, // [0:2] is the sub-list for field type_name |
| 193 |
} |
| 194 |
|
| 195 |
func init() { file_google_actions_type_date_range_proto_init() } |
| 196 |
func file_google_actions_type_date_range_proto_init() { |
| 197 |
if File_google_actions_type_date_range_proto != nil { |
| 198 |
return |
| 199 |
} |
| 200 |
if !protoimpl.UnsafeEnabled { |
| 201 |
file_google_actions_type_date_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 202 |
switch v := v.(*DateRange); i { |
| 203 |
case 0: |
| 204 |
return &v.state |
| 205 |
case 1: |
| 206 |
return &v.sizeCache |
| 207 |
case 2: |
| 208 |
return &v.unknownFields |
| 209 |
default: |
| 210 |
return nil |
| 211 |
} |
| 212 |
} |
| 213 |
} |
| 214 |
type x struct{} |
| 215 |
out := protoimpl.TypeBuilder{ |
| 216 |
File: protoimpl.DescBuilder{ |
| 217 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 218 |
RawDescriptor: file_google_actions_type_date_range_proto_rawDesc, |
| 219 |
NumEnums: 0, |
| 220 |
NumMessages: 1, |
| 221 |
NumExtensions: 0, |
| 222 |
NumServices: 0, |
| 223 |
}, |
| 224 |
GoTypes: file_google_actions_type_date_range_proto_goTypes, |
| 225 |
DependencyIndexes: file_google_actions_type_date_range_proto_depIdxs, |
| 226 |
MessageInfos: file_google_actions_type_date_range_proto_msgTypes, |
| 227 |
}.Build() |
| 228 |
File_google_actions_type_date_range_proto = out.File |
| 229 |
file_google_actions_type_date_range_proto_rawDesc = nil |
| 230 |
file_google_actions_type_date_range_proto_goTypes = nil |
| 231 |
file_google_actions_type_date_range_proto_depIdxs = nil |
| 232 |
} |