Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
fix: applying a different code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
suztomo committed Sep 22, 2022
1 parent be38dff commit f855e87
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1947,14 +1947,14 @@ private Trigger(
break;
case 8:
{
typeCase_ = 1;
type_ = input.readInt32();
typeCase_ = 1;
break;
}
case 17:
{
typeCase_ = 2;
type_ = input.readDouble();
typeCase_ = 2;
break;
}
default:
Expand Down Expand Up @@ -3885,7 +3885,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
!= com.google.monitoring.v3.ComparisonType.COMPARISON_UNSPECIFIED.getNumber()) {
output.writeEnum(4, comparison_);
}
if (thresholdValue_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(thresholdValue_) != 0) {
output.writeDouble(5, thresholdValue_);
}
if (duration_ != null) {
Expand Down Expand Up @@ -3919,7 +3919,7 @@ public int getSerializedSize() {
!= com.google.monitoring.v3.ComparisonType.COMPARISON_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, comparison_);
}
if (thresholdValue_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(thresholdValue_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, thresholdValue_);
}
if (duration_ != null) {
Expand Down Expand Up @@ -9109,7 +9109,7 @@ public int getLabelExtractorsCount() {
@java.lang.Override
public boolean containsLabelExtractors(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabelExtractors().getMap().containsKey(key);
}
Expand Down Expand Up @@ -9163,7 +9163,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelExtractorsMap()
public java.lang.String getLabelExtractorsOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map =
internalGetLabelExtractors().getMap();
Expand All @@ -9190,7 +9190,7 @@ public java.lang.String getLabelExtractorsOrDefault(
@java.lang.Override
public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map =
internalGetLabelExtractors().getMap();
Expand Down Expand Up @@ -9739,7 +9739,7 @@ public int getLabelExtractorsCount() {
@java.lang.Override
public boolean containsLabelExtractors(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabelExtractors().getMap().containsKey(key);
}
Expand Down Expand Up @@ -9793,7 +9793,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelExtractorsMap()
public java.lang.String getLabelExtractorsOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map =
internalGetLabelExtractors().getMap();
Expand All @@ -9820,7 +9820,7 @@ public java.lang.String getLabelExtractorsOrDefault(
@java.lang.Override
public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map =
internalGetLabelExtractors().getMap();
Expand Down Expand Up @@ -9854,7 +9854,7 @@ public Builder clearLabelExtractors() {
*/
public Builder removeLabelExtractors(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableLabelExtractors().getMutableMap().remove(key);
return this;
Expand Down Expand Up @@ -9884,11 +9884,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableLabelExtracto
*/
public Builder putLabelExtractors(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
if (value == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map value");
}

internalGetMutableLabelExtractors().getMutableMap().put(key, value);
return this;
}
Expand Down Expand Up @@ -15895,7 +15896,7 @@ public int getUserLabelsCount() {
@java.lang.Override
public boolean containsUserLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetUserLabels().getMap().containsKey(key);
}
Expand Down Expand Up @@ -15941,7 +15942,7 @@ public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
public java.lang.String getUserLabelsOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -15963,7 +15964,7 @@ public java.lang.String getUserLabelsOrDefault(
@java.lang.Override
public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -17641,7 +17642,7 @@ public int getUserLabelsCount() {
@java.lang.Override
public boolean containsUserLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetUserLabels().getMap().containsKey(key);
}
Expand Down Expand Up @@ -17687,7 +17688,7 @@ public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
public java.lang.String getUserLabelsOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -17709,7 +17710,7 @@ public java.lang.String getUserLabelsOrDefault(
@java.lang.Override
public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -17738,7 +17739,7 @@ public Builder clearUserLabels() {
*/
public Builder removeUserLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableUserLabels().getMutableMap().remove(key);
return this;
Expand All @@ -17764,11 +17765,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableUserLabels()
*/
public Builder putUserLabels(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
if (value == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map value");
}

internalGetMutableUserLabels().getMutableMap().put(key, value);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return Whether the timeSeries field is set.
*/
@java.lang.Override
Expand All @@ -159,6 +160,7 @@ public boolean hasTimeSeries() {
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return The timeSeries.
*/
@java.lang.Override
Expand Down Expand Up @@ -194,6 +196,7 @@ public com.google.monitoring.v3.TimeSeriesOrBuilder getTimeSeriesOrBuilder() {
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return Whether the status field is set.
*/
@java.lang.Override
Expand All @@ -210,6 +213,7 @@ public boolean hasStatus() {
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return The status.
*/
@java.lang.Override
Expand Down Expand Up @@ -603,6 +607,7 @@ public Builder mergeFrom(
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return Whether the timeSeries field is set.
*/
@java.lang.Deprecated
Expand All @@ -618,6 +623,7 @@ public boolean hasTimeSeries() {
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return The timeSeries.
*/
@java.lang.Deprecated
Expand Down Expand Up @@ -794,6 +800,7 @@ public com.google.monitoring.v3.TimeSeriesOrBuilder getTimeSeriesOrBuilder() {
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return Whether the status field is set.
*/
@java.lang.Deprecated
Expand All @@ -809,6 +816,7 @@ public boolean hasStatus() {
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return The status.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface CreateTimeSeriesErrorOrBuilder
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return Whether the timeSeries field is set.
*/
@java.lang.Deprecated
Expand All @@ -45,6 +46,7 @@ public interface CreateTimeSeriesErrorOrBuilder
*
* <code>.google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true];</code>
*
* @deprecated
* @return The timeSeries.
*/
@java.lang.Deprecated
Expand All @@ -70,6 +72,7 @@ public interface CreateTimeSeriesErrorOrBuilder
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return Whether the status field is set.
*/
@java.lang.Deprecated
Expand All @@ -83,6 +86,7 @@ public interface CreateTimeSeriesErrorOrBuilder
*
* <code>.google.rpc.Status status = 2 [deprecated = true];</code>
*
* @deprecated
* @return The status.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public int getLabelCount() {
@java.lang.Override
public boolean containsLabel(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabel().getMap().containsKey(key);
}
Expand Down Expand Up @@ -212,7 +212,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelMap() {
@java.lang.Override
public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabel().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -229,7 +229,7 @@ public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String
@java.lang.Override
public java.lang.String getLabelOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabel().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -631,7 +631,7 @@ public int getLabelCount() {
@java.lang.Override
public boolean containsLabel(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabel().getMap().containsKey(key);
}
Expand Down Expand Up @@ -666,7 +666,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelMap() {
@java.lang.Override
public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabel().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -683,7 +683,7 @@ public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String
@java.lang.Override
public java.lang.String getLabelOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabel().getMap();
if (!map.containsKey(key)) {
Expand All @@ -707,7 +707,7 @@ public Builder clearLabel() {
*/
public Builder removeLabel(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableLabel().getMutableMap().remove(key);
return this;
Expand All @@ -728,11 +728,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableLabel() {
*/
public Builder putLabel(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
if (value == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map value");
}

internalGetMutableLabel().getMutableMap().put(key, value);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ private LabelValue(
break;
case 8:
{
valueCase_ = 1;
value_ = input.readBool();
valueCase_ = 1;
break;
}
case 16:
{
valueCase_ = 2;
value_ = input.readInt64();
valueCase_ = 2;
break;
}
case 26:
Expand Down
Loading

0 comments on commit f855e87

Please sign in to comment.