google_cloud_wkt/wrappers.rs
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// https://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/// Implements the `google.cloud.DoubleValue` well-known type.
16///
17/// In early versions of the `proto3` syntax optional primitive types were
18/// represented by well-known messages, with a single field, that contained the
19/// value. In Rust, we represent these with `Option` of the correct type. The
20/// aliases are introduced here to simplify the code generator and resolve any
21/// references in code or documentation.
22///
23/// The JSON representation for `DoubleValue` is JSON number.
24pub type DoubleValue = f64;
25
26/// Implements the `google.cloud.FloatValue` well-known type.
27///
28/// In early versions of the `proto3` syntax optional primitive types were
29/// represented by well-known messages, with a single field, that contained the
30/// value. In Rust, we represent these with `Option` of the correct type. The
31/// aliases are introduced here to simplify the code generator and resolve any
32/// references in code or documentation.
33///
34/// The JSON representation for `FloatValue` is JSON number.
35pub type FloatValue = f32;
36
37/// Implements the `google.cloud.Int64Value` well-known type.
38///
39/// In early versions of the `proto3` syntax optional primitive types were
40/// represented by well-known messages, with a single field, that contained the
41/// value. In Rust, we represent these with `Option` of the correct type. The
42/// aliases are introduced here to simplify the code generator and resolve any
43/// references in code or documentation.
44///
45/// The JSON representation for `Int64Value` is JSON string.
46pub type Int64Value = i64;
47
48/// Implements the `google.cloud.UInt64Value` well-known type.
49///
50/// In early versions of the `proto3` syntax optional primitive types were
51/// represented by well-known messages, with a single field, that contained the
52/// value. In Rust, we represent these with `Option` of the correct type. The
53/// aliases are introduced here to simplify the code generator and resolve any
54/// references in code or documentation.
55///
56/// The JSON representation for `UInt64Value` is JSON string.
57pub type UInt64Value = u64;
58
59/// Implements the `google.cloud.Int32Value` well-known type.
60///
61/// In early versions of the `proto3` syntax optional primitive types were
62/// represented by well-known messages, with a single field, that contained the
63/// value. In Rust, we represent these with `Option` of the correct type. The
64/// aliases are introduced here to simplify the code generator and resolve any
65/// references in code or documentation.
66///
67/// The JSON representation for `Int32Value` is JSON number.
68pub type Int32Value = i32;
69
70/// Implements the `google.cloud.UInt32Value` well-known type.
71///
72/// In early versions of the `proto3` syntax optional primitive types were
73/// represented by well-known messages, with a single field, that contained the
74/// value. In Rust, we represent these with `Option` of the correct type. The
75/// aliases are introduced here to simplify the code generator and resolve any
76/// references in code or documentation.
77///
78/// The JSON representation for `UInt32Value` is JSON number.
79pub type UInt32Value = u32;
80
81/// Implements the `google.cloud.BoolValue` well-known type.
82///
83/// In early versions of the `proto3` syntax optional primitive types were
84/// represented by well-known messages, with a single field, that contained the
85/// value. In Rust, we represent these with `Option` of the correct type. The
86/// aliases are introduced here to simplify the code generator and resolve any
87/// references in code or documentation.
88///
89/// The JSON representation for `BoolValue` is JSON `true` and `false`.
90pub type BoolValue = bool;
91
92/// Implements the `google.cloud.StringValue` well-known type.
93///
94/// In early versions of the `proto3` syntax optional primitive types were
95/// represented by well-known messages, with a single field, that contained the
96/// value. In Rust, we represent these with `Option` of the correct type. The
97/// aliases are introduced here to simplify the code generator and resolve any
98/// references in code or documentation.
99///
100/// The JSON representation for `StringValue` is JSON string.
101pub type StringValue = String;
102
103/// Implements the `google.cloud.BytesValue` well-known type.
104///
105/// In early versions of the `proto3` syntax optional primitive types were
106/// represented by well-known messages, with a single field, that contained the
107/// value. In Rust, we represent these with `Option` of the correct type. The
108/// aliases are introduced here to simplify the code generator and resolve any
109/// references in code or documentation.
110///
111/// The JSON representation for `BytesValue` is JSON string.
112pub type BytesValue = bytes::Bytes;