Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/pubsub/v1/pubsub.proto
// Protobuf Java Version: 3.25.5
package com.google.pubsub.v1;
/**
*
*
*
* Settings for an ingestion data source on a topic.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings}
*/
public final class IngestionDataSourceSettings extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings)
IngestionDataSourceSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use IngestionDataSourceSettings.newBuilder() to construct.
private IngestionDataSourceSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private IngestionDataSourceSettings() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new IngestionDataSourceSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.class,
com.google.pubsub.v1.IngestionDataSourceSettings.Builder.class);
}
public interface AwsKinesisOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Permission denied encountered while consuming data from Kinesis.
* This can happen if:
* - The provided `aws_role_arn` does not exist or does not have the
* appropriate permissions attached.
* - The provided `aws_role_arn` is not set up properly for Identity
* Federation using `gcp_service_account`.
* - The Pub/Sub SA is not granted the
* `iam.serviceAccounts.getOpenIdToken` permission on
* `gcp_service_account`.
*
* Permission denied encountered while publishing to the topic. This can
* happen if the Pub/Sub SA has not been granted the [appropriate publish
* permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Ingestion is active.
*
*
* ACTIVE = 1;
*/
public static final int ACTIVE_VALUE = 1;
/**
*
*
*
* Permission denied encountered while consuming data from Kinesis.
* This can happen if:
* - The provided `aws_role_arn` does not exist or does not have the
* appropriate permissions attached.
* - The provided `aws_role_arn` is not set up properly for Identity
* Federation using `gcp_service_account`.
* - The Pub/Sub SA is not granted the
* `iam.serviceAccounts.getOpenIdToken` permission on
* `gcp_service_account`.
*
*
* KINESIS_PERMISSION_DENIED = 2;
*/
public static final int KINESIS_PERMISSION_DENIED_VALUE = 2;
/**
*
*
*
* Permission denied encountered while publishing to the topic. This can
* happen if the Pub/Sub SA has not been granted the [appropriate publish
* permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
*
*
* PUBLISH_PERMISSION_DENIED = 3;
*/
public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3;
/**
*
*
*
* The Kinesis stream does not exist.
*
*
* STREAM_NOT_FOUND = 4;
*/
public static final int STREAM_NOT_FOUND_VALUE = 4;
/**
*
*
*
* The Kinesis consumer does not exist.
*
*
* CONSUMER_NOT_FOUND = 5;
*/
public static final int CONSUMER_NOT_FOUND_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return ACTIVE;
case 2:
return KINESIS_PERMISSION_DENIED;
case 3:
return PUBLISH_PERMISSION_DENIED;
case 4:
return STREAM_NOT_FOUND;
case 5:
return CONSUMER_NOT_FOUND;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public State findValueByNumber(int number) {
return State.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final State[] VALUES = values();
public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State)
}
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getState() {
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State result =
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.forNumber(state_);
return result == null
? com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.UNRECOGNIZED
: result;
}
public static final int STREAM_ARN_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object streamArn_ = "";
/**
*
*
*
* Required. The Kinesis stream ARN to ingest data from.
*
* Required. The Kinesis consumer ARN to used for ingestion in Enhanced
* Fan-Out mode. The consumer must be already created and ready to be used.
*
*
* string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for consumerArn.
*/
@java.lang.Override
public com.google.protobuf.ByteString getConsumerArnBytes() {
java.lang.Object ref = consumerArn_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
consumerArn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AWS_ROLE_ARN_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object awsRoleArn_ = "";
/**
*
*
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
*
* string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for awsRoleArn.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAwsRoleArnBytes() {
java.lang.Object ref = awsRoleArn_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
awsRoleArn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GCP_SERVICE_ACCOUNT_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object gcpServiceAccount_ = "";
/**
*
*
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Ingestion settings for Amazon Kinesis Data Streams.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.class,
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder.class);
}
// Construct using com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
streamArn_ = "";
consumerArn_ = "";
awsRoleArn_ = "";
gcpServiceAccount_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis
getDefaultInstanceForType() {
return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance();
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis build() {
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis buildPartial() {
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis result =
new com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.streamArn_ = streamArn_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.consumerArn_ = consumerArn_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.awsRoleArn_ = awsRoleArn_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.gcpServiceAccount_ = gcpServiceAccount_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) {
return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis other) {
if (other
== com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getStreamArn().isEmpty()) {
streamArn_ = other.streamArn_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getConsumerArn().isEmpty()) {
consumerArn_ = other.consumerArn_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getAwsRoleArn().isEmpty()) {
awsRoleArn_ = other.awsRoleArn_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getGcpServiceAccount().isEmpty()) {
gcpServiceAccount_ = other.gcpServiceAccount_;
bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
streamArn_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
consumerArn_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
awsRoleArn_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
gcpServiceAccount_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getState() {
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State result =
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.forNumber(state_);
return result == null
? com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(
com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Kinesis
* ingestion source.
*
* Required. The Kinesis consumer ARN to used for ingestion in Enhanced
* Fan-Out mode. The consumer must be already created and ready to be used.
*
*
* string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for consumerArn to set.
* @return This builder for chaining.
*/
public Builder setConsumerArnBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
consumerArn_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object awsRoleArn_ = "";
/**
*
*
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
*
* string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The awsRoleArn to set.
* @return This builder for chaining.
*/
public Builder setAwsRoleArn(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
awsRoleArn_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
* Required. AWS role ARN to be used for Federated Identity authentication
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
* required permissions that need to be attached to it.
*
*
* string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for awsRoleArn to set.
* @return This builder for chaining.
*/
public Builder setAwsRoleArnBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
awsRoleArn_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object gcpServiceAccount_ = "";
/**
*
*
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
*
* string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The gcpServiceAccount to set.
* @return This builder for chaining.
*/
public Builder setGcpServiceAccount(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gcpServiceAccount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
* Required. The GCP service account to be used for Federated Identity
* authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
* the provided role). The `aws_role_arn` must be set up with
* `accounts.google.com:sub` equals to this service account number.
*
*
* string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for gcpServiceAccount to set.
* @return This builder for chaining.
*/
public Builder setGcpServiceAccountBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gcpServiceAccount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
}
// @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
private static final com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis();
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AwsKinesis parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CloudStorageOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat pubsub_avro_format = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the pubsubAvroFormat field is set.
*/
boolean hasPubsubAvroFormat();
/**
*
*
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Permission denied encountered while calling the Cloud Storage API. This
* can happen if the Pub/Sub SA has not been granted the
* [appropriate
* permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
* - storage.objects.list: to list the objects in a bucket.
* - storage.objects.get: to read the objects in a bucket.
* - storage.buckets.get: to verify the bucket exists.
*
* Permission denied encountered while publishing to the topic. This can
* happen if the Pub/Sub SA has not been granted the [appropriate publish
* permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Ingestion is active.
*
*
* ACTIVE = 1;
*/
public static final int ACTIVE_VALUE = 1;
/**
*
*
*
* Permission denied encountered while calling the Cloud Storage API. This
* can happen if the Pub/Sub SA has not been granted the
* [appropriate
* permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
* - storage.objects.list: to list the objects in a bucket.
* - storage.objects.get: to read the objects in a bucket.
* - storage.buckets.get: to verify the bucket exists.
*
*
* CLOUD_STORAGE_PERMISSION_DENIED = 2;
*/
public static final int CLOUD_STORAGE_PERMISSION_DENIED_VALUE = 2;
/**
*
*
*
* Permission denied encountered while publishing to the topic. This can
* happen if the Pub/Sub SA has not been granted the [appropriate publish
* permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
*
*
* PUBLISH_PERMISSION_DENIED = 3;
*/
public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3;
/**
*
*
*
* The provided Cloud Storage bucket doesn't exist.
*
*
* BUCKET_NOT_FOUND = 4;
*/
public static final int BUCKET_NOT_FOUND_VALUE = 4;
/**
*
*
*
* The Cloud Storage bucket has too many objects, ingestion will be
* paused.
*
*
* TOO_MANY_OBJECTS = 5;
*/
public static final int TOO_MANY_OBJECTS_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return ACTIVE;
case 2:
return CLOUD_STORAGE_PERMISSION_DENIED;
case 3:
return PUBLISH_PERMISSION_DENIED;
case 4:
return BUCKET_NOT_FOUND;
case 5:
return TOO_MANY_OBJECTS;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public State findValueByNumber(int number) {
return State.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final State[] VALUES = values();
public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State)
}
public interface TextFormatOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. When unset, '\n' is used.
*
*
* optional string delimiter = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the delimiter field is set.
*/
boolean hasDelimiter();
/**
*
*
*
* Configuration for reading Cloud Storage data in text format. Each line of
* text as specified by the delimiter will be set to the `data` field of a
* Pub/Sub message.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat}
*/
public static final class TextFormat extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
TextFormatOrBuilder {
private static final long serialVersionUID = 0L;
// Use TextFormat.newBuilder() to construct.
private TextFormat(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TextFormat() {
delimiter_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TextFormat();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder
.class);
}
private int bitField0_;
public static final int DELIMITER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object delimiter_ = "";
/**
*
*
*
* Optional. When unset, '\n' is used.
*
*
* optional string delimiter = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the delimiter field is set.
*/
@java.lang.Override
public boolean hasDelimiter() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
*
* optional string delimiter = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for delimiter.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDelimiterBytes() {
java.lang.Object ref = delimiter_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
delimiter_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, delimiter_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, delimiter_);
}
size += getUnknownFields().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.IngestionDataSourceSettings.CloudStorage.TextFormat)) {
return super.equals(obj);
}
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat other =
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) obj;
if (hasDelimiter() != other.hasDelimiter()) return false;
if (hasDelimiter()) {
if (!getDelimiter().equals(other.getDelimiter())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDelimiter()) {
hash = (37 * hash) + DELIMITER_FIELD_NUMBER;
hash = (53 * hash) + getDelimiter().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Configuration for reading Cloud Storage data in text format. Each line of
* text as specified by the delimiter will be set to the `data` field of a
* Pub/Sub message.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder
.class);
}
// Construct using
// com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
delimiter_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
getDefaultInstanceForType() {
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
.getDefaultInstance();
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat build() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
buildPartial() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat result =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.delimiter_ = delimiter_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) {
return mergeFrom(
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat other) {
if (other
== com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
.getDefaultInstance()) return this;
if (other.hasDelimiter()) {
delimiter_ = other.delimiter_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
delimiter_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object delimiter_ = "";
/**
*
*
*
* Optional. When unset, '\n' is used.
*
*
* optional string delimiter = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the delimiter field is set.
*/
public boolean hasDelimiter() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
*
* optional string delimiter = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for delimiter to set.
* @return This builder for chaining.
*/
public Builder setDelimiterBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
delimiter_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
}
// @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
private static final com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat();
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TextFormat parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AvroFormatOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
com.google.protobuf.MessageOrBuilder {}
/**
*
*
*
* Configuration for reading Cloud Storage data in Avro binary format. The
* bytes of each object will be set to the `data` field of a Pub/Sub
* message.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat}
*/
public static final class AvroFormat extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
AvroFormatOrBuilder {
private static final long serialVersionUID = 0L;
// Use AvroFormat.newBuilder() to construct.
private AvroFormat(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AvroFormat() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AvroFormat();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder
.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += getUnknownFields().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.IngestionDataSourceSettings.CloudStorage.AvroFormat)) {
return super.equals(obj);
}
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat other =
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) obj;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Configuration for reading Cloud Storage data in Avro binary format. The
* bytes of each object will be set to the `data` field of a Pub/Sub
* message.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder
.class);
}
// Construct using
// com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
getDefaultInstanceForType() {
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
.getDefaultInstance();
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat build() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
buildPartial() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat result =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) {
return mergeFrom(
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat other) {
if (other
== com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
.getDefaultInstance()) return this;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
}
// @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
private static final com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat();
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AvroFormat parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PubSubAvroFormatOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
com.google.protobuf.MessageOrBuilder {}
/**
*
*
*
* Configuration for reading Cloud Storage data written via [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
* data and attributes fields of the originally exported Pub/Sub message
* will be restored when publishing.
*
*
* Protobuf type {@code
* google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat}
*/
public static final class PubSubAvroFormat extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
PubSubAvroFormatOrBuilder {
private static final long serialVersionUID = 0L;
// Use PubSubAvroFormat.newBuilder() to construct.
private PubSubAvroFormat(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PubSubAvroFormat() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new PubSubAvroFormat();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.Builder.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += getUnknownFields().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.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)) {
return super.equals(obj);
}
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat other =
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) obj;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Configuration for reading Cloud Storage data written via [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
* data and attributes fields of the originally exported Pub/Sub message
* will be restored when publishing.
*
*
* Protobuf type {@code
* google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.Builder.class);
}
// Construct using
// com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
getDefaultInstanceForType() {
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.getDefaultInstance();
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
build() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
buildPartial() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat result =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat(
this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) {
return mergeFrom(
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat other) {
if (other
== com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.getDefaultInstance()) return this;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
}
// @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
private static final com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage
.PubSubAvroFormat
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat();
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PubSubAvroFormat parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int inputFormatCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object inputFormat_;
public enum InputFormatCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TEXT_FORMAT(3),
AVRO_FORMAT(4),
PUBSUB_AVRO_FORMAT(5),
INPUTFORMAT_NOT_SET(0);
private final int value;
private InputFormatCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InputFormatCase valueOf(int value) {
return forNumber(value);
}
public static InputFormatCase forNumber(int value) {
switch (value) {
case 3:
return TEXT_FORMAT;
case 4:
return AVRO_FORMAT;
case 5:
return PUBSUB_AVRO_FORMAT;
case 0:
return INPUTFORMAT_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public InputFormatCase getInputFormatCase() {
return InputFormatCase.forNumber(inputFormatCase_);
}
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State getState() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State result =
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.forNumber(state_);
return result == null
? com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.UNRECOGNIZED
: result;
}
public static final int BUCKET_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object bucket_ = "";
/**
*
*
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
*
* string bucket = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for bucket.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBucketBytes() {
java.lang.Object ref = bucket_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
bucket_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEXT_FORMAT_FIELD_NUMBER = 3;
/**
*
*
*
* Optional. Data from Cloud Storage will be interpreted as text.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat text_format = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the textFormat field is set.
*/
@java.lang.Override
public boolean hasTextFormat() {
return inputFormatCase_ == 3;
}
/**
*
*
*
* Optional. Data from Cloud Storage will be interpreted as text.
*
* Optional. Data from Cloud Storage will be interpreted in Avro format.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat avro_format = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatOrBuilder
getAvroFormatOrBuilder() {
if (inputFormatCase_ == 4) {
return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
inputFormat_;
}
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat
.getDefaultInstance();
}
public static final int PUBSUB_AVRO_FORMAT_FIELD_NUMBER = 5;
/**
*
*
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat pubsub_avro_format = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the pubsubAvroFormat field is set.
*/
@java.lang.Override
public boolean hasPubsubAvroFormat() {
return inputFormatCase_ == 5;
}
/**
*
*
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat pubsub_avro_format = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatOrBuilder
getPubsubAvroFormatOrBuilder() {
if (inputFormatCase_ == 5) {
return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
inputFormat_;
}
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat
.getDefaultInstance();
}
public static final int MINIMUM_OBJECT_CREATE_TIME_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp minimumObjectCreateTime_;
/**
*
*
*
* Optional. Only objects with a larger or equal creation timestamp will be
* ingested.
*
*
*
* .google.protobuf.Timestamp minimum_object_create_time = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the minimumObjectCreateTime field is set.
*/
@java.lang.Override
public boolean hasMinimumObjectCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Only objects with a larger or equal creation timestamp will be
* ingested.
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
*
* string match_glob = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for matchGlob.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMatchGlobBytes() {
java.lang.Object ref = matchGlob_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
matchGlob_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (state_
!= com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bucket_);
}
if (inputFormatCase_ == 3) {
output.writeMessage(
3,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
inputFormat_);
}
if (inputFormatCase_ == 4) {
output.writeMessage(
4,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
inputFormat_);
}
if (inputFormatCase_ == 5) {
output.writeMessage(
5,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
inputFormat_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getMinimumObjectCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchGlob_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, matchGlob_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (state_
!= com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bucket_);
}
if (inputFormatCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat)
inputFormat_);
}
if (inputFormatCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat)
inputFormat_);
}
if (inputFormatCase_ == 5) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
5,
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat)
inputFormat_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, getMinimumObjectCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchGlob_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, matchGlob_);
}
size += getUnknownFields().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.IngestionDataSourceSettings.CloudStorage)) {
return super.equals(obj);
}
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage other =
(com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) obj;
if (state_ != other.state_) return false;
if (!getBucket().equals(other.getBucket())) return false;
if (hasMinimumObjectCreateTime() != other.hasMinimumObjectCreateTime()) return false;
if (hasMinimumObjectCreateTime()) {
if (!getMinimumObjectCreateTime().equals(other.getMinimumObjectCreateTime())) return false;
}
if (!getMatchGlob().equals(other.getMatchGlob())) return false;
if (!getInputFormatCase().equals(other.getInputFormatCase())) return false;
switch (inputFormatCase_) {
case 3:
if (!getTextFormat().equals(other.getTextFormat())) return false;
break;
case 4:
if (!getAvroFormat().equals(other.getAvroFormat())) return false;
break;
case 5:
if (!getPubsubAvroFormat().equals(other.getPubsubAvroFormat())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + BUCKET_FIELD_NUMBER;
hash = (53 * hash) + getBucket().hashCode();
if (hasMinimumObjectCreateTime()) {
hash = (37 * hash) + MINIMUM_OBJECT_CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getMinimumObjectCreateTime().hashCode();
}
hash = (37 * hash) + MATCH_GLOB_FIELD_NUMBER;
hash = (53 * hash) + getMatchGlob().hashCode();
switch (inputFormatCase_) {
case 3:
hash = (37 * hash) + TEXT_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getTextFormat().hashCode();
break;
case 4:
hash = (37 * hash) + AVRO_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getAvroFormat().hashCode();
break;
case 5:
hash = (37 * hash) + PUBSUB_AVRO_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getPubsubAvroFormat().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Ingestion settings for Cloud Storage.
*
*
* Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage)
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.class,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder.class);
}
// Construct using com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMinimumObjectCreateTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
bucket_ = "";
if (textFormatBuilder_ != null) {
textFormatBuilder_.clear();
}
if (avroFormatBuilder_ != null) {
avroFormatBuilder_.clear();
}
if (pubsubAvroFormatBuilder_ != null) {
pubsubAvroFormatBuilder_.clear();
}
minimumObjectCreateTime_ = null;
if (minimumObjectCreateTimeBuilder_ != null) {
minimumObjectCreateTimeBuilder_.dispose();
minimumObjectCreateTimeBuilder_ = null;
}
matchGlob_ = "";
inputFormatCase_ = 0;
inputFormat_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.pubsub.v1.PubsubProto
.internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage
getDefaultInstanceForType() {
return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance();
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage build() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage buildPartial() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage result =
new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.bucket_ = bucket_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.minimumObjectCreateTime_ =
minimumObjectCreateTimeBuilder_ == null
? minimumObjectCreateTime_
: minimumObjectCreateTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.matchGlob_ = matchGlob_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage result) {
result.inputFormatCase_ = inputFormatCase_;
result.inputFormat_ = this.inputFormat_;
if (inputFormatCase_ == 3 && textFormatBuilder_ != null) {
result.inputFormat_ = textFormatBuilder_.build();
}
if (inputFormatCase_ == 4 && avroFormatBuilder_ != null) {
result.inputFormat_ = avroFormatBuilder_.build();
}
if (inputFormatCase_ == 5 && pubsubAvroFormatBuilder_ != null) {
result.inputFormat_ = pubsubAvroFormatBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) {
return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage other) {
if (other
== com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getBucket().isEmpty()) {
bucket_ = other.bucket_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasMinimumObjectCreateTime()) {
mergeMinimumObjectCreateTime(other.getMinimumObjectCreateTime());
}
if (!other.getMatchGlob().isEmpty()) {
matchGlob_ = other.matchGlob_;
bitField0_ |= 0x00000040;
onChanged();
}
switch (other.getInputFormatCase()) {
case TEXT_FORMAT:
{
mergeTextFormat(other.getTextFormat());
break;
}
case AVRO_FORMAT:
{
mergeAvroFormat(other.getAvroFormat());
break;
}
case PUBSUB_AVRO_FORMAT:
{
mergePubsubAvroFormat(other.getPubsubAvroFormat());
break;
}
case INPUTFORMAT_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
bucket_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getTextFormatFieldBuilder().getBuilder(), extensionRegistry);
inputFormatCase_ = 3;
break;
} // case 26
case 34:
{
input.readMessage(getAvroFormatFieldBuilder().getBuilder(), extensionRegistry);
inputFormatCase_ = 4;
break;
} // case 34
case 42:
{
input.readMessage(
getPubsubAvroFormatFieldBuilder().getBuilder(), extensionRegistry);
inputFormatCase_ = 5;
break;
} // case 42
case 50:
{
input.readMessage(
getMinimumObjectCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 74:
{
matchGlob_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 74
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int inputFormatCase_ = 0;
private java.lang.Object inputFormat_;
public InputFormatCase getInputFormatCase() {
return InputFormatCase.forNumber(inputFormatCase_);
}
public Builder clearInputFormat() {
inputFormatCase_ = 0;
inputFormat_ = null;
onChanged();
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State getState() {
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State result =
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.forNumber(state_);
return result == null
? com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. An output-only field that indicates the state of the Cloud
* Storage ingestion source.
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
*
* string bucket = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bucket to set.
* @return This builder for chaining.
*/
public Builder setBucket(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bucket_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
* Optional. Cloud Storage bucket. The bucket name must be without any
* prefix like "gs://". See the [bucket naming requirements]
* (https://cloud.google.com/storage/docs/buckets#naming).
*
*
* string bucket = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for bucket to set.
* @return This builder for chaining.
*/
public Builder setBucketBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bucket_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder,
com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatOrBuilder>
textFormatBuilder_;
/**
*
*
*
* Optional. Data from Cloud Storage will be interpreted as text.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat text_format = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the textFormat field is set.
*/
@java.lang.Override
public boolean hasTextFormat() {
return inputFormatCase_ == 3;
}
/**
*
*
*
* Optional. Data from Cloud Storage will be interpreted as text.
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat pubsub_avro_format = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the pubsubAvroFormat field is set.
*/
@java.lang.Override
public boolean hasPubsubAvroFormat() {
return inputFormatCase_ == 5;
}
/**
*
*
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. It will be assumed data from Cloud Storage was written via
* [Cloud Storage
* subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
*
* string match_glob = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The matchGlob to set.
* @return This builder for chaining.
*/
public Builder setMatchGlob(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
matchGlob_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
* Optional. Glob pattern used to match objects that will be ingested. If
* unset, all objects will be ingested. See the [supported
* patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
*
*
* string match_glob = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for matchGlob to set.
* @return This builder for chaining.
*/
public Builder setMatchGlobBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
matchGlob_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage)
}
// @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage)
private static final com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage();
}
public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CloudStorage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int sourceCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object source_;
public enum SourceCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AWS_KINESIS(1),
CLOUD_STORAGE(2),
SOURCE_NOT_SET(0);
private final int value;
private SourceCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SourceCase valueOf(int value) {
return forNumber(value);
}
public static SourceCase forNumber(int value) {
switch (value) {
case 1:
return AWS_KINESIS;
case 2:
return CLOUD_STORAGE;
case 0:
return SOURCE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public SourceCase getSourceCase() {
return SourceCase.forNumber(sourceCase_);
}
public static final int AWS_KINESIS_FIELD_NUMBER = 1;
/**
*
*
*
* Optional. Amazon Kinesis Data Streams.
*
*
*
* .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the awsKinesis field is set.
*/
@java.lang.Override
public boolean hasAwsKinesis() {
return sourceCase_ == 1;
}
/**
*
*
*