Debian Codegraph @

googleapis/type/money/money.pb.go

raw symbols SCIP
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/money.proto
20
21 package money
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 an amount of money with its currency type.
39 type Money struct {
40 state protoimpl.MessageState
41 sizeCache protoimpl.SizeCache
42 unknownFields protoimpl.UnknownFields
43
44 // The three-letter currency code defined in ISO 4217.
45 CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
46 // The whole units of the amount.
47 // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
48 Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
49 // Number of nano (10^-9) units of the amount.
50 // The value must be between -999,999,999 and +999,999,999 inclusive.
51 // If `units` is positive, `nanos` must be positive or zero.
52 // If `units` is zero, `nanos` can be positive, zero, or negative.
53 // If `units` is negative, `nanos` must be negative or zero.
54 // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
55 Nanos int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
56 }
57
58 func (x *Money) Reset() {
59 *x = Money{}
60 if protoimpl.UnsafeEnabled {
61 mi := &file_google_type_money_proto_msgTypes[0]
62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
63 ms.StoreMessageInfo(mi)
64 }
65 }
66
67 func (x *Money) String() string {
68 return protoimpl.X.MessageStringOf(x)
69 }
70
71 func (*Money) ProtoMessage() {}
72
73 func (x *Money) ProtoReflect() protoreflect.Message {
74 mi := &file_google_type_money_proto_msgTypes[0]
75 if protoimpl.UnsafeEnabled && x != nil {
76 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
77 if ms.LoadMessageInfo() == nil {
78 ms.StoreMessageInfo(mi)
79 }
80 return ms
81 }
82 return mi.MessageOf(x)
83 }
84
85 // Deprecated: Use Money.ProtoReflect.Descriptor instead.
86 func (*Money) Descriptor() ([]byte, []int) {
87 return file_google_type_money_proto_rawDescGZIP(), []int{0}
88 }
89
90 func (x *Money) GetCurrencyCode() string {
91 if x != nil {
92 return x.CurrencyCode
93 }
94 return ""
95 }
96
97 func (x *Money) GetUnits() int64 {
98 if x != nil {
99 return x.Units
100 }
101 return 0
102 }
103
104 func (x *Money) GetNanos() int32 {
105 if x != nil {
106 return x.Nanos
107 }
108 return 0
109 }
110
111 var File_google_type_money_proto protoreflect.FileDescriptor
112
113 var file_google_type_money_proto_rawDesc = []byte{
114 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x6f,
115 0x6e, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
116 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12,
117 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65,
118 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79,
119 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20,
120 0x01, 0x28, 0x03, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61,
121 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73,
122 0x42, 0x5d, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74,
123 0x79, 0x70, 0x65, 0x42, 0x0a, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
124 0x01, 0x5a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67,
125 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
126 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x6f,
127 0x6e, 0x65, 0x79, 0x3b, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0xa2, 0x02, 0x03, 0x47, 0x54, 0x50, 0x62,
128 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
129 }
130
131 var (
132 file_google_type_money_proto_rawDescOnce sync.Once
133 file_google_type_money_proto_rawDescData = file_google_type_money_proto_rawDesc
134 )
135
136 func file_google_type_money_proto_rawDescGZIP() []byte {
137 file_google_type_money_proto_rawDescOnce.Do(func() {
138 file_google_type_money_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_money_proto_rawDescData)
139 })
140 return file_google_type_money_proto_rawDescData
141 }
142
143 var file_google_type_money_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
144 var file_google_type_money_proto_goTypes = []interface{}{
145 (*Money)(nil), // 0: google.type.Money
146 }
147 var file_google_type_money_proto_depIdxs = []int32{
148 0, // [0:0] is the sub-list for method output_type
149 0, // [0:0] is the sub-list for method input_type
150 0, // [0:0] is the sub-list for extension type_name
151 0, // [0:0] is the sub-list for extension extendee
152 0, // [0:0] is the sub-list for field type_name
153 }
154
155 func init() { file_google_type_money_proto_init() }
156 func file_google_type_money_proto_init() {
157 if File_google_type_money_proto != nil {
158 return
159 }
160 if !protoimpl.UnsafeEnabled {
161 file_google_type_money_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
162 switch v := v.(*Money); i {
163 case 0:
164 return &v.state
165 case 1:
166 return &v.sizeCache
167 case 2:
168 return &v.unknownFields
169 default:
170 return nil
171 }
172 }
173 }
174 type x struct{}
175 out := protoimpl.TypeBuilder{
176 File: protoimpl.DescBuilder{
177 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
178 RawDescriptor: file_google_type_money_proto_rawDesc,
179 NumEnums: 0,
180 NumMessages: 1,
181 NumExtensions: 0,
182 NumServices: 0,
183 },
184 GoTypes: file_google_type_money_proto_goTypes,
185 DependencyIndexes: file_google_type_money_proto_depIdxs,
186 MessageInfos: file_google_type_money_proto_msgTypes,
187 }.Build()
188 File_google_type_money_proto = out.File
189 file_google_type_money_proto_rawDesc = nil
190 file_google_type_money_proto_goTypes = nil
191 file_google_type_money_proto_depIdxs = nil
192 }