/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { 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(); } return map.get(key); }
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { 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> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { 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(); } return map.get(key); }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { 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> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */
@java.lang.Override public com.google.pubsub.v1.Topic buildPartial() { com.google.pubsub.v1.Topic result = new com.google.pubsub.v1.Topic(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); if (messageStoragePolicyBuilder_ == null) { result.messageStoragePolicy_ = messageStoragePolicy_; } else { result.messageStoragePolicy_ = messageStoragePolicyBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */
@java.lang.Override public com.google.pubsub.v1.Topic buildPartial() { com.google.pubsub.v1.Topic result = new com.google.pubsub.v1.Topic(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); if (messageStoragePolicyBuilder_ == null) { result.messageStoragePolicy_ = messageStoragePolicy_; } else { result.messageStoragePolicy_ = messageStoragePolicyBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**