Google 类型
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
以下是推荐活动 Feed 规范中引用的 Google 类型定义。
google.type.Money 定义
// Represents an amount of money with its currency type.
message google.type.Money {
// The three-letter currency code defined in ISO 4217.
string currency_code = 1;
// The whole units of the amount.
// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
int64 units = 2;
// Number of nano (10^-9) units of the amount.
// The value must be between -999,999,999 and +999,999,999 inclusive.
// If `units` is positive, `nanos` must be positive or zero.
// If `units` is zero, `nanos` can be positive, zero, or negative.
// If `units` is negative, `nanos` must be negative or zero.
// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
int32 nanos = 3;
}
google.type.LatLng 定义
// An object that represents a latitude/longitude pair. This is expressed as a
// pair of doubles to represent degrees latitude and degrees longitude. Unless
// specified otherwise, this must conform to the
// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
// standard</a>. Values must be within normalized ranges.
message google.type.LatLng {
// The latitude in degrees. It must be in the range [-90.0, +90.0].
double latitude = 1;
// The longitude in degrees. It must be in the range [-180.0, +180.0].
double longitude = 2;
}
google.type.LocalizedText 定义
message google.type.LocalizedText {
// Localized string in the language corresponding to `language_code`.
string text = 1;
// The text's BCP-47 language code, such as "en-US" or "sr-Latn".
//
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
string language_code = 2;
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eGoogle provides type definitions like \u003ccode\u003egoogle.type.Money\u003c/code\u003e, \u003ccode\u003egoogle.type.LatLng\u003c/code\u003e, and \u003ccode\u003egoogle.type.LocalizedText\u003c/code\u003e that are used by the Things to do feed specification.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egoogle.type.Money\u003c/code\u003e represents monetary values with a currency code, whole units, and nano units for precision.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egoogle.type.LatLng\u003c/code\u003e stores geographical coordinates as latitude and longitude conforming to the WGS84 standard.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egoogle.type.LocalizedText\u003c/code\u003e allows for storing text with its corresponding language code for internationalization.\u003c/p\u003e\n"]]],["The content defines three Google types. `google.type.Money` represents a monetary amount with a three-letter currency code, whole units, and nano units. `google.type.LatLng` defines a latitude/longitude pair in degrees, conforming to the WGS84 standard, with latitude ranging from -90.0 to +90.0 and longitude from -180.0 to +180.0. `google.type.LocalizedText` contains a localized string and its corresponding BCP-47 language code.\n"],null,["# Google types\n\nThe following are Google type definitions which are referenced by Things to do\nfeed spec.\n\ngoogle.type.Money definition\n----------------------------\n\n // Represents an amount of money with its currency type.\n message google.type.Money {\n // The three-letter currency code defined in ISO 4217.\n string currency_code = 1;\n\n // The whole units of the amount.\n // For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.\n int64 units = 2;\n\n // Number of nano (10^-9) units of the amount.\n // The value must be between -999,999,999 and +999,999,999 inclusive.\n // If `units` is positive, `nanos` must be positive or zero.\n // If `units` is zero, `nanos` can be positive, zero, or negative.\n // If `units` is negative, `nanos` must be negative or zero.\n // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.\n int32 nanos = 3;\n }\n\ngoogle.type.LatLng definition\n-----------------------------\n\n // An object that represents a latitude/longitude pair. This is expressed as a\n // pair of doubles to represent degrees latitude and degrees longitude. Unless\n // specified otherwise, this must conform to the\n // \u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\n // standard\u003c/a\u003e. Values must be within normalized ranges.\n message google.type.LatLng {\n // The latitude in degrees. It must be in the range [-90.0, +90.0].\n double latitude = 1;\n\n // The longitude in degrees. It must be in the range [-180.0, +180.0].\n double longitude = 2;\n }\n\ngoogle.type.LocalizedText definition\n------------------------------------\n\n message google.type.LocalizedText {\n // Localized string in the language corresponding to `language_code`.\n string text = 1;\n\n // The text's BCP-47 language code, such as \"en-US\" or \"sr-Latn\".\n //\n // For more information, see\n // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.\n string language_code = 2;\n }"]]