@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.GetSubscriptionRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.GetSubscriptionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The name of the subscription to get. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subscription_ = value; onChanged(); return this; }
/** * Check whether the user provided Cloud Pub/Sub subscription name specified by {@link * #CPS_SUBSCRIPTION_CONFIG} exists or not. */ @VisibleForTesting public void verifySubscription(String cpsProject, String cpsSubscription, CredentialsProvider credentialsProvider) { try { SubscriberFutureStub stub = SubscriberGrpc.newFutureStub(ConnectorUtils.getChannel(credentialsProvider)); GetSubscriptionRequest request = GetSubscriptionRequest.newBuilder() .setSubscription( String.format( ConnectorUtils.CPS_SUBSCRIPTION_FORMAT, cpsProject, cpsSubscription)) .build(); stub.getSubscription(request).get(); } catch (Exception e) { throw new ConnectException( "Error verifying the subscription " + cpsSubscription + " for project " + cpsProject, e); } }
/** * * * <pre> * The name of the subscription to get. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder setSubscription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } subscription_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the subscription to get. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subscription_ = value; onChanged(); return this; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.GetSubscriptionRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.GetSubscriptionRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.GetSubscriptionRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.GetSubscriptionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.GetSubscriptionRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.GetSubscriptionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <code>optional string subscription = 1;</code> * * <pre> * The name of the subscription to get. * </pre> */ public Builder setSubscriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subscription_ = value; onChanged(); return this; } public final Builder setUnknownFields(
/** * <pre> * The name of the subscription to get. * </pre> * * <code>optional string subscription = 1;</code> */ public Builder setSubscriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subscription_ = value; onChanged(); return this; } public final Builder setUnknownFields(
/** * <code>optional string subscription = 1;</code> * * <pre> * The name of the subscription to get. * </pre> */ public Builder setSubscription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } subscription_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the subscription to get. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder clearSubscription() { subscription_ = getDefaultInstance().getSubscription(); onChanged(); return this; } /**
/** * <pre> * The name of the subscription to get. * </pre> * * <code>optional string subscription = 1;</code> */ public Builder setSubscription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } subscription_ = value; onChanged(); return this; } /**
public static Builder newBuilder(com.google.pubsub.v1.GetSubscriptionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
private Builder() { maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>optional string subscription = 1;</code> * * <pre> * The name of the subscription to get. * </pre> */ public Builder clearSubscription() { subscription_ = getDefaultInstance().getSubscription(); onChanged(); return this; } /**