...

Source file src/google.golang.org/genproto/googleapis/type/date/date.pb.go

Documentation: google.golang.org/genproto/googleapis/type/date

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

View as plain text