/** * * * <pre> * The message payload for PubsubMessage. * Pubsub message must contain either non-empty data, or at least one * attribute. * </pre> * * <code>bytes data = 3;</code> */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. * The name of the Cloud Pub/Sub topic to which messages will * be published when a job is delivered. The topic name must be in the * same format as required by PubSub's * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), * for example `projects/PROJECT_ID/topics/TOPIC_ID`. * The topic must be in the same project as the Cloud Scheduler job. * </pre> * * <code>string topic_name = 1;</code> */ public Builder setTopicNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); topicName_ = value; onChanged(); return this; }
/** * * * <pre> * Required. * The name of the Cloud Pub/Sub topic to which messages will * be published when a job is delivered. The topic name must be in the * same format as required by PubSub's * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), * for example `projects/PROJECT_ID/topics/TOPIC_ID`. * The topic must be in the same project as the Cloud Scheduler job. * </pre> * * <code>string topic_name = 1;</code> */ public Builder setTopicName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } topicName_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. * The name of the Cloud Pub/Sub topic to which messages will * be published when a job is delivered. The topic name must be in the * same format as required by PubSub's * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), * for example `projects/PROJECT_ID/topics/TOPIC_ID`. * The topic must be in the same project as the Cloud Scheduler job. * </pre> * * <code>string topic_name = 1;</code> */ public Builder clearTopicName() { topicName_ = getDefaultInstance().getTopicName(); onChanged(); return this; } /**
/** * * * <pre> * The message payload for PubsubMessage. * Pubsub message must contain either non-empty data, or at least one * attribute. * </pre> * * <code>bytes data = 3;</code> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.PubsubTarget other) { if (other == com.google.cloud.scheduler.v1beta1.PubsubTarget.getDefaultInstance()) return this; if (!other.getTopicName().isEmpty()) { topicName_ = other.topicName_; onChanged(); } if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { onChanged(); ; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } return attributes_; }