/** * * * <pre> * Policy constraining how messages published to the topic may be stored. It * is determined when the topic is created based on the policy configured at * the project level. It must not be set by the caller in the request to * CreateTopic or to UpdateTopic. This field will be populated in the * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the * response, then no constraints are in effect. * </pre> * * <code>.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;</code> */ public Builder setMessageStoragePolicy(com.google.pubsub.v1.MessageStoragePolicy value) { if (messageStoragePolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } messageStoragePolicy_ = value; onChanged(); } else { messageStoragePolicyBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>optional string name = 1;</code> */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } public final Builder setUnknownFields(
/** * <code>optional string name = 1;</code> * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * * * <pre> * Policy constraining how messages published to the topic may be stored. It * is determined when the topic is created based on the policy configured at * the project level. It must not be set by the caller in the request to * CreateTopic or to UpdateTopic. This field will be populated in the * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the * response, then no constraints are in effect. * </pre> * * <code>.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;</code> */ public com.google.pubsub.v1.MessageStoragePolicy.Builder getMessageStoragePolicyBuilder() { onChanged(); return getMessageStoragePolicyFieldBuilder().getBuilder(); } /**
/** * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>optional string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * <code>optional string name = 1;</code> * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels() { onChanged(); ; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; }
public Builder mergeFrom(com.google.pubsub.v1.Topic other) { if (other == com.google.pubsub.v1.Topic.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasMessageStoragePolicy()) { mergeMessageStoragePolicy(other.getMessageStoragePolicy()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
messageStoragePolicy_ = value; onChanged(); } else { messageStoragePolicyBuilder_.mergeFrom(value);
/** * * * <pre> * Policy constraining how messages published to the topic may be stored. It * is determined when the topic is created based on the policy configured at * the project level. It must not be set by the caller in the request to * CreateTopic or to UpdateTopic. This field will be populated in the * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the * response, then no constraints are in effect. * </pre> * * <code>.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;</code> */ public Builder clearMessageStoragePolicy() { if (messageStoragePolicyBuilder_ == null) { messageStoragePolicy_ = null; onChanged(); } else { messageStoragePolicy_ = null; messageStoragePolicyBuilder_ = null; } return this; } /**
/** * * * <pre> * Policy constraining how messages published to the topic may be stored. It * is determined when the topic is created based on the policy configured at * the project level. It must not be set by the caller in the request to * CreateTopic or to UpdateTopic. This field will be populated in the * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the * response, then no constraints are in effect. * </pre> * * <code>.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;</code> */ public Builder setMessageStoragePolicy( com.google.pubsub.v1.MessageStoragePolicy.Builder builderForValue) { if (messageStoragePolicyBuilder_ == null) { messageStoragePolicy_ = builderForValue.build(); onChanged(); } else { messageStoragePolicyBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent * signs (`%`). It must be between 3 and 255 characters in length, and it * must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * * * <pre> * Policy constraining how messages published to the topic may be stored. It * is determined when the topic is created based on the policy configured at * the project level. It must not be set by the caller in the request to * CreateTopic or to UpdateTopic. This field will be populated in the * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the * response, then no constraints are in effect. * </pre> * * <code>.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;</code> */ public com.google.pubsub.v1.MessageStoragePolicy.Builder getMessageStoragePolicyBuilder() { onChanged(); return getMessageStoragePolicyFieldBuilder().getBuilder(); } /**
public Builder mergeFrom(com.google.pubsub.v1.Topic other) { if (other == com.google.pubsub.v1.Topic.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasMessageStoragePolicy()) { mergeMessageStoragePolicy(other.getMessageStoragePolicy()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels() { onChanged(); ; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; }