/** * * * <pre> * A URL locating the endpoint to which messages should be pushed. * For example, a Webhook endpoint might use "https://example.com/push". * </pre> * * <code>string push_endpoint = 1;</code> */ public Builder clearPushEndpoint() { pushEndpoint_ = getDefaultInstance().getPushEndpoint(); onChanged(); return this; } /**
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.pubsub.v1.PushConfig buildPartial() { com.google.pubsub.v1.PushConfig result = new com.google.pubsub.v1.PushConfig(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.pushEndpoint_ = pushEndpoint_; result.attributes_ = internalGetAttributes(); result.attributes_.makeImmutable(); result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.PushConfig)) { return super.equals(obj); } com.google.pubsub.v1.PushConfig other = (com.google.pubsub.v1.PushConfig) obj; boolean result = true; result = result && getPushEndpoint().equals(other.getPushEndpoint()); result = result && internalGetAttributes().equals(other.internalGetAttributes()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getPushEndpointBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pushEndpoint_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); unknownFields.writeTo(output); }
@java.lang.Override public com.google.pubsub.v1.PushConfig getDefaultInstanceForType() { return com.google.pubsub.v1.PushConfig.getDefaultInstance(); }
@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetAttributes(); default: throw new RuntimeException("Invalid map field number: " + number); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PUSH_ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getPushEndpoint().hashCode(); if (!internalGetAttributes().getMap().isEmpty()) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + PUSH_ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getPushEndpoint().hashCode(); if (!internalGetAttributes().getMap().isEmpty()) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public com.google.pubsub.v1.PushConfig build() { com.google.pubsub.v1.PushConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
e.getMessage()).setUnfinishedMessage(this)); } finally { makeExtensionsImmutable();
/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getPushEndpointBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pushEndpoint_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetAttributes().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> attributes__ = AttributesDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.PushConfig)) { return super.equals(obj); } com.google.pubsub.v1.PushConfig other = (com.google.pubsub.v1.PushConfig) obj; boolean result = true; result = result && getPushEndpoint() .equals(other.getPushEndpoint()); result = result && internalGetAttributes().equals( other.internalGetAttributes()); return result; }
public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PUSH_ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getPushEndpoint().hashCode(); if (!internalGetAttributes().getMap().isEmpty()) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }