@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue;
/** * * * <pre> * Cloud Labels are a flexible and lightweight mechanism for organizing cloud * resources into groups that reflect a customer's organizational needs and * deployment strategies. Cloud Labels can be used to filter collections of * resources. They can be used to control how resource metrics are aggregated. * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * * Label keys must be between 1 and 63 characters long and must conform to * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * * Label values must be between 0 and 63 characters long and must conform * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * * No more than 64 labels can be associated with a given resource. * See https://goo.gl/xmQnxf for more information on and examples of labels. * If you plan to use labels in your own code, please note that additional * characters may be allowed in the future. And so you are advised to use an * internal label representation, such as JSON, which doesn't rely upon * specific characters being disallowed. For example, representing labels * as the string: name + "_" + value would prove problematic if we were to * allow "_" in a future release. * </pre> * * <code>map<string, string> labels = 7;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
throw new java.lang.NullPointerException(); return internalGetLabels().getMap().containsKey(key);
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException();
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getConfigBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); } if (nodeCount_ != 0) { output.writeInt32(5, nodeCount_); } if (state_ != com.google.spanner.admin.instance.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(6, state_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); unknownFields.writeTo(output); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONFIG_FIELD_NUMBER; hash = (53 * hash) + getConfig().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getNodeCount(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.admin.instance.v1.Instance)) { return super.equals(obj); } com.google.spanner.admin.instance.v1.Instance other = (com.google.spanner.admin.instance.v1.Instance) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getConfig().equals(other.getConfig()); result = result && getDisplayName().equals(other.getDisplayName()); result = result && (getNodeCount() == other.getNodeCount()); result = result && state_ == other.state_; result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && unknownFields.equals(other.unknownFields); return result; }
internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry
@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**
/** * * * <pre> * Cloud Labels are a flexible and lightweight mechanism for organizing cloud * resources into groups that reflect a customer's organizational needs and * deployment strategies. Cloud Labels can be used to filter collections of * resources. They can be used to control how resource metrics are aggregated. * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * * Label keys must be between 1 and 63 characters long and must conform to * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * * Label values must be between 0 and 63 characters long and must conform * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * * No more than 64 labels can be associated with a given resource. * See https://goo.gl/xmQnxf for more information on and examples of labels. * If you plan to use labels in your own code, please note that additional * characters may be allowed in the future. And so you are advised to use an * internal label representation, such as JSON, which doesn't rely upon * specific characters being disallowed. For example, representing labels * as the string: name + "_" + value would prove problematic if we were to * allow "_" in a future release. * </pre> * * <code>map<string, string> labels = 7;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
throw new java.lang.NullPointerException(); return internalGetLabels().getMap().containsKey(key);
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue;
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException();
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getConfigBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); } if (nodeCount_ != 0) { output.writeInt32(5, nodeCount_); } if (state_ != com.google.spanner.admin.instance.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(6, state_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); unknownFields.writeTo(output); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONFIG_FIELD_NUMBER; hash = (53 * hash) + getConfig().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getNodeCount(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.admin.instance.v1.Instance)) { return super.equals(obj); } com.google.spanner.admin.instance.v1.Instance other = (com.google.spanner.admin.instance.v1.Instance) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getConfig().equals(other.getConfig()); result = result && getDisplayName().equals(other.getDisplayName()); result = result && (getNodeCount() == other.getNodeCount()); result = result && state_ == other.state_; result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && unknownFields.equals(other.unknownFields); return result; }
internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry