diff --git a/proto-google-common-protos/src/main/java/com/google/type/Color.java b/proto-google-common-protos/src/main/java/com/google/type/Color.java index f57fa1ac..39aa16d7 100644 --- a/proto-google-common-protos/src/main/java/com/google/type/Color.java +++ b/proto-google-common-protos/src/main/java/com/google/type/Color.java @@ -24,18 +24,19 @@ *
* Represents a color in the RGBA color space. This representation is designed * for simplicity of conversion to/from color representations in various - * languages over compactness; for example, the fields of this representation - * can be trivially provided to the constructor of "java.awt.Color" in Java; it - * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + * languages over compactness. For example, the fields of this representation + * can be trivially provided to the constructor of `java.awt.Color` in Java; it + * can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` * method in iOS; and, with just a little work, it can be easily formatted into - * a CSS "rgba()" string in JavaScript, as well. - * Note: this proto does not carry information about the absolute color space + * a CSS `rgba()` string in JavaScript. + * This reference page doesn't carry information about the absolute color + * space * that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, - * DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color + * DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color * space. - * Note: when color equality needs to be decided, implementations, unless - * documented otherwise, will treat two colors to be equal if all their red, - * green, blue and alpha values each differ by at most 1e-5. + * When color equality needs to be decided, implementations, unless + * documented otherwise, treat two colors as equal if all their red, + * green, blue, and alpha values each differ by at most 1e-5. * Example (Java): * import com.google.type.Color; * // ... @@ -110,13 +111,13 @@ * var green = Math.floor(greenFrac * 255); * var blue = Math.floor(blueFrac * 255); * if (!('alpha' in rgb_color)) { - * return rgbToCssColor_(red, green, blue); + * return rgbToCssColor(red, green, blue); * } * var alphaFrac = rgb_color.alpha.value || 0.0; * var rgbParams = [red, green, blue].join(','); * return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); * }; - * var rgbToCssColor_ = function(red, green, blue) { + * var rgbToCssColor = function(red, green, blue) { * var rgbNumber = new Number((red << 16) | (green << 8) | blue); * var hexString = rgbNumber.toString(16); * var missingZeros = 6 - hexString.length; @@ -296,13 +297,13 @@ public float getBlue() { ** * Protobuf type {@code google.type.Date} diff --git a/proto-google-common-protos/src/main/java/com/google/type/Decimal.java b/proto-google-common-protos/src/main/java/com/google/type/Decimal.java new file mode 100644 index 00000000..fdea8cf1 --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/type/Decimal.java @@ -0,0 +1,935 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/decimal.proto + +package com.google.type; + +/** + * + * + ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -319,13 +320,13 @@ public boolean hasAlpha() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -342,13 +343,13 @@ public com.google.protobuf.FloatValue getAlpha() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -556,18 +557,19 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build ** Represents a color in the RGBA color space. This representation is designed * for simplicity of conversion to/from color representations in various - * languages over compactness; for example, the fields of this representation - * can be trivially provided to the constructor of "java.awt.Color" in Java; it - * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + * languages over compactness. For example, the fields of this representation + * can be trivially provided to the constructor of `java.awt.Color` in Java; it + * can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` * method in iOS; and, with just a little work, it can be easily formatted into - * a CSS "rgba()" string in JavaScript, as well. - * Note: this proto does not carry information about the absolute color space + * a CSS `rgba()` string in JavaScript. + * This reference page doesn't carry information about the absolute color + * space * that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, - * DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color + * DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color * space. - * Note: when color equality needs to be decided, implementations, unless - * documented otherwise, will treat two colors to be equal if all their red, - * green, blue and alpha values each differ by at most 1e-5. + * When color equality needs to be decided, implementations, unless + * documented otherwise, treat two colors as equal if all their red, + * green, blue, and alpha values each differ by at most 1e-5. * Example (Java): * import com.google.type.Color; * // ... @@ -642,13 +644,13 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * var green = Math.floor(greenFrac * 255); * var blue = Math.floor(blueFrac * 255); * if (!('alpha' in rgb_color)) { - * return rgbToCssColor_(red, green, blue); + * return rgbToCssColor(red, green, blue); * } * var alphaFrac = rgb_color.alpha.value || 0.0; * var rgbParams = [red, green, blue].join(','); * return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); * }; - * var rgbToCssColor_ = function(red, green, blue) { + * var rgbToCssColor = function(red, green, blue) { * var rgbNumber = new Number((red << 16) | (green << 8) | blue); * var hexString = rgbNumber.toString(16); * var missingZeros = 6 - hexString.length; @@ -1000,13 +1002,13 @@ public Builder clearBlue() { ** * Protobuf type {@code google.type.Date} @@ -369,7 +370,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * A year on its own, with zero month and day values * * A year and month value, with a zero day, such as a credit card expiration * date - * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. + * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + * `google.protobuf.Timestamp`. ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1022,13 +1024,13 @@ public boolean hasAlpha() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1048,13 +1050,13 @@ public com.google.protobuf.FloatValue getAlpha() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1078,13 +1080,13 @@ public Builder setAlpha(com.google.protobuf.FloatValue value) { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1105,13 +1107,13 @@ public Builder setAlpha(com.google.protobuf.FloatValue.Builder builderForValue) ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1137,13 +1139,13 @@ public Builder mergeAlpha(com.google.protobuf.FloatValue value) { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1165,13 +1167,13 @@ public Builder clearAlpha() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1187,13 +1189,13 @@ public com.google.protobuf.FloatValue.Builder getAlphaBuilder() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -1211,13 +1213,13 @@ public com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder() { ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
diff --git a/proto-google-common-protos/src/main/java/com/google/type/ColorOrBuilder.java b/proto-google-common-protos/src/main/java/com/google/type/ColorOrBuilder.java index 675c1500..f789a85d 100644 --- a/proto-google-common-protos/src/main/java/com/google/type/ColorOrBuilder.java +++ b/proto-google-common-protos/src/main/java/com/google/type/ColorOrBuilder.java @@ -68,13 +68,13 @@ public interface ColorOrBuilder ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -88,13 +88,13 @@ public interface ColorOrBuilder ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
@@ -108,13 +108,13 @@ public interface ColorOrBuilder ** The fraction of this color that should be applied to the pixel. That is, * the final pixel color is defined by the equation: - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` * This means that a value of 1.0 corresponds to a solid color, whereas * a value of 0.0 corresponds to a completely transparent color. This * uses a wrapper message rather than a simple float scalar so that it is * possible to distinguish between a default value and the value being unset. - * If omitted, this color object is to be rendered as a solid color - * (as if the alpha value had been explicitly given with a value of 1.0). + * If omitted, this color object is rendered as a solid color + * (as if the alpha value had been explicitly given a value of 1.0). ** *.google.protobuf.FloatValue alpha = 4;
diff --git a/proto-google-common-protos/src/main/java/com/google/type/Date.java b/proto-google-common-protos/src/main/java/com/google/type/Date.java index 0ede3866..f2748a89 100644 --- a/proto-google-common-protos/src/main/java/com/google/type/Date.java +++ b/proto-google-common-protos/src/main/java/com/google/type/Date.java @@ -31,7 +31,8 @@ * * A year on its own, with zero month and day values * * A year and month value, with a zero day, such as a credit card expiration * date - * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. + * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + * `google.protobuf.Timestamp`. *
+ * A representation of a decimal value, such as 2.5. Clients may convert values + * into language-native decimal formats, such as Java's [BigDecimal][] or + * Python's [decimal.Decimal][]. + * [BigDecimal]: + * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html + * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html + *+ * + * Protobuf type {@code google.type.Decimal} + */ +public final class Decimal extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.type.Decimal) + DecimalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Decimal.newBuilder() to construct. + private Decimal(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Decimal() { + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Decimal(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Decimal( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.type.DecimalProto.internal_static_google_type_Decimal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.DecimalProto.internal_static_google_type_Decimal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Decimal.class, com.google.type.Decimal.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+ * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The value.
+ */
+ @java.lang.Override
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getValueBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getValueBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.type.Decimal)) {
+ return super.equals(obj);
+ }
+ com.google.type.Decimal other = (com.google.type.Decimal) obj;
+
+ if (!getValue().equals(other.getValue())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValue().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.type.Decimal parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Decimal parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Decimal parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Decimal parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Decimal parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Decimal parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Decimal parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Decimal parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.Decimal parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Decimal parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.Decimal parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Decimal parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.type.Decimal prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A representation of a decimal value, such as 2.5. Clients may convert values + * into language-native decimal formats, such as Java's [BigDecimal][] or + * Python's [decimal.Decimal][]. + * [BigDecimal]: + * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html + * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html + *+ * + * Protobuf type {@code google.type.Decimal} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The value.
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+
+ value_ = getDefaultInstance().getValue();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @param value The bytes for value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValueBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.type.Decimal)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.type.Decimal)
+ private static final com.google.type.Decimal DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.type.Decimal();
+ }
+
+ public static com.google.type.Decimal getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The value.
+ */
+ java.lang.String getValue();
+ /**
+ *
+ *
+ * + * The decimal value, as a string. + * The string representation consists of an optional sign, `+` (`U+002B`) + * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + * ("the integer"), optionally followed by a fraction, optionally followed + * by an exponent. + * The fraction consists of a decimal point followed by zero or more decimal + * digits. The string must contain at least one digit in either the integer + * or the fraction. The number formed by the sign, the integer and the + * fraction is referred to as the significand. + * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + * followed by one or more decimal digits. + * Services **should** normalize decimal values before storing them by: + * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + * Services **may** perform additional normalization based on its own needs + * and the internal decimal implementation selected, such as shifting the + * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + * Additionally, services **may** preserve trailing zeroes in the fraction + * to indicate increased precision, but are not required to do so. + * Note that only the `.` character is supported to divide the integer + * and the fraction; `,` **should not** be supported regardless of locale. + * Additionally, thousand separators **should not** be supported. If a + * service does support them, values **must** be normalized. + * The ENBF grammar is: + * DecimalString = + * [Sign] Significand [Exponent]; + * Sign = '+' | '-'; + * Significand = + * Digits ['.'] [Digits] | [Digits] '.' Digits; + * Exponent = ('e' | 'E') [Sign] Digits; + * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + * Services **should** clearly document the range of supported values, the + * maximum supported precision (total number of digits), and, if applicable, + * the scale (number of digits after the decimal point), as well as how it + * behaves when receiving out-of-bounds values. + * Services **may** choose to accept values passed as input even when the + * value has a higher precision or scale than the service supports, and + * **should** round the value to fit the supported scale. Alternatively, the + * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + * if precision would be lost. + * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + * gRPC) if the service receives a value outside of the supported range. + *+ * + *
string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ com.google.protobuf.ByteString getValueBytes();
+}
diff --git a/proto-google-common-protos/src/main/java/com/google/type/DecimalProto.java b/proto-google-common-protos/src/main/java/com/google/type/DecimalProto.java
new file mode 100644
index 00000000..56ac8966
--- /dev/null
+++ b/proto-google-common-protos/src/main/java/com/google/type/DecimalProto.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/decimal.proto
+
+package com.google.type;
+
+public final class DecimalProto {
+ private DecimalProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_type_Decimal_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_type_Decimal_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\031google/type/decimal.proto\022\013google.type"
+ + "\"\030\n\007Decimal\022\r\n\005value\030\001 \001(\tBf\n\017com.google"
+ + ".typeB\014DecimalProtoP\001Z:google.golang.org"
+ + "/genproto/googleapis/type/decimal;decima"
+ + "l\370\001\001\242\002\003GTPb\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+ internal_static_google_type_Decimal_descriptor = getDescriptor().getMessageTypes().get(0);
+ internal_static_google_type_Decimal_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_type_Decimal_descriptor,
+ new java.lang.String[] {
+ "Value",
+ });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-common-protos/src/main/java/com/google/type/Month.java b/proto-google-common-protos/src/main/java/com/google/type/Month.java
index d8cd5c2d..07bb37a9 100644
--- a/proto-google-common-protos/src/main/java/com/google/type/Month.java
+++ b/proto-google-common-protos/src/main/java/com/google/type/Month.java
@@ -32,7 +32,7 @@ public enum Month implements com.google.protobuf.ProtocolMessageEnum {
*
*
* - * The unspecifed month. + * The unspecified month. ** *
MONTH_UNSPECIFIED = 0;
@@ -165,7 +165,7 @@ public enum Month implements com.google.protobuf.ProtocolMessageEnum {
*
*
* - * The unspecifed month. + * The unspecified month. ** *
MONTH_UNSPECIFIED = 0;
diff --git a/proto-google-common-protos/src/main/java/com/google/type/TimeOfDay.java b/proto-google-common-protos/src/main/java/com/google/type/TimeOfDay.java
index e44341d9..1445701e 100644
--- a/proto-google-common-protos/src/main/java/com/google/type/TimeOfDay.java
+++ b/proto-google-common-protos/src/main/java/com/google/type/TimeOfDay.java
@@ -24,7 +24,8 @@
* * Represents a time of day. The date and time zone are either not significant * or are specified elsewhere. An API may choose to allow leap seconds. Related - * types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`. + * types are [google.type.Date][google.type.Date] and + * `google.protobuf.Timestamp`. ** * Protobuf type {@code google.type.TimeOfDay} @@ -385,7 +386,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
* Represents a time of day. The date and time zone are either not significant * or are specified elsewhere. An API may choose to allow leap seconds. Related - * types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`. + * types are [google.type.Date][google.type.Date] and + * `google.protobuf.Timestamp`. ** * Protobuf type {@code google.type.TimeOfDay} diff --git a/synth.metadata b/synth.metadata index f6c86779..31171399 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-common-protos.git", - "sha": "3fe8289816924b9d4fdcefa49f225fc456c44064" + "sha": "35eb687d4bcbc69cef18ddb9bfa41e0473ac4b40" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e71120af081ab9402669df1f290beeae9629e16", - "internalRef": "361581745" + "sha": "15c5e21948ff6fbe41f91bdf04f6252f91a12d59", + "internalRef": "364894175" } }, { @@ -295,6 +295,9 @@ "proto-google-common-protos/src/main/java/com/google/type/DateTimeProto.java", "proto-google-common-protos/src/main/java/com/google/type/DayOfWeek.java", "proto-google-common-protos/src/main/java/com/google/type/DayOfWeekProto.java", + "proto-google-common-protos/src/main/java/com/google/type/Decimal.java", + "proto-google-common-protos/src/main/java/com/google/type/DecimalOrBuilder.java", + "proto-google-common-protos/src/main/java/com/google/type/DecimalProto.java", "proto-google-common-protos/src/main/java/com/google/type/Expr.java", "proto-google-common-protos/src/main/java/com/google/type/ExprOrBuilder.java", "proto-google-common-protos/src/main/java/com/google/type/ExprProto.java",