com.google.cloud.datastream.v1.GcsDestinationConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-datastream-v1 Show documentation
Show all versions of proto-google-cloud-datastream-v1 Show documentation
Proto library for google-cloud-datastream
/*
* Copyright 2020 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/cloud/datastream/v1/datastream_resources.proto
package com.google.cloud.datastream.v1;
/**
*
*
*
* Google Cloud Storage destination configuration
*
*
* Protobuf type {@code google.cloud.datastream.v1.GcsDestinationConfig}
*/
public final class GcsDestinationConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.GcsDestinationConfig)
GcsDestinationConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use GcsDestinationConfig.newBuilder() to construct.
private GcsDestinationConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GcsDestinationConfig() {
path_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new GcsDestinationConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private GcsDestinationConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 16:
{
fileRotationMb_ = input.readInt32();
break;
}
case 26:
{
com.google.protobuf.Duration.Builder subBuilder = null;
if (fileRotationInterval_ != null) {
subBuilder = fileRotationInterval_.toBuilder();
}
fileRotationInterval_ =
input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fileRotationInterval_);
fileRotationInterval_ = subBuilder.buildPartial();
}
break;
}
case 802:
{
com.google.cloud.datastream.v1.AvroFileFormat.Builder subBuilder = null;
if (fileFormatCase_ == 100) {
subBuilder =
((com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_).toBuilder();
}
fileFormat_ =
input.readMessage(
com.google.cloud.datastream.v1.AvroFileFormat.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_);
fileFormat_ = subBuilder.buildPartial();
}
fileFormatCase_ = 100;
break;
}
case 810:
{
com.google.cloud.datastream.v1.JsonFileFormat.Builder subBuilder = null;
if (fileFormatCase_ == 101) {
subBuilder =
((com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_).toBuilder();
}
fileFormat_ =
input.readMessage(
com.google.cloud.datastream.v1.JsonFileFormat.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_);
fileFormat_ = subBuilder.buildPartial();
}
fileFormatCase_ = 101;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.datastream.v1.DatastreamResourcesProto
.internal_static_google_cloud_datastream_v1_GcsDestinationConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.datastream.v1.DatastreamResourcesProto
.internal_static_google_cloud_datastream_v1_GcsDestinationConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.datastream.v1.GcsDestinationConfig.class,
com.google.cloud.datastream.v1.GcsDestinationConfig.Builder.class);
}
private int fileFormatCase_ = 0;
private java.lang.Object fileFormat_;
public enum FileFormatCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AVRO_FILE_FORMAT(100),
JSON_FILE_FORMAT(101),
FILEFORMAT_NOT_SET(0);
private final int value;
private FileFormatCase(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 FileFormatCase valueOf(int value) {
return forNumber(value);
}
public static FileFormatCase forNumber(int value) {
switch (value) {
case 100:
return AVRO_FILE_FORMAT;
case 101:
return JSON_FILE_FORMAT;
case 0:
return FILEFORMAT_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public FileFormatCase getFileFormatCase() {
return FileFormatCase.forNumber(fileFormatCase_);
}
public static final int PATH_FIELD_NUMBER = 1;
private volatile java.lang.Object path_;
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @return The path.
*/
@java.lang.Override
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILE_ROTATION_MB_FIELD_NUMBER = 2;
private int fileRotationMb_;
/**
*
*
*
* The maximum file size to be saved in the bucket.
*
*
* int32 file_rotation_mb = 2;
*
* @return The fileRotationMb.
*/
@java.lang.Override
public int getFileRotationMb() {
return fileRotationMb_;
}
public static final int FILE_ROTATION_INTERVAL_FIELD_NUMBER = 3;
private com.google.protobuf.Duration fileRotationInterval_;
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*
* @return Whether the fileRotationInterval field is set.
*/
@java.lang.Override
public boolean hasFileRotationInterval() {
return fileRotationInterval_ != null;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*
* @return The fileRotationInterval.
*/
@java.lang.Override
public com.google.protobuf.Duration getFileRotationInterval() {
return fileRotationInterval_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: fileRotationInterval_;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getFileRotationIntervalOrBuilder() {
return getFileRotationInterval();
}
public static final int AVRO_FILE_FORMAT_FIELD_NUMBER = 100;
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*
* @return Whether the avroFileFormat field is set.
*/
@java.lang.Override
public boolean hasAvroFileFormat() {
return fileFormatCase_ == 100;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*
* @return The avroFileFormat.
*/
@java.lang.Override
public com.google.cloud.datastream.v1.AvroFileFormat getAvroFileFormat() {
if (fileFormatCase_ == 100) {
return (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
@java.lang.Override
public com.google.cloud.datastream.v1.AvroFileFormatOrBuilder getAvroFileFormatOrBuilder() {
if (fileFormatCase_ == 100) {
return (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
}
public static final int JSON_FILE_FORMAT_FIELD_NUMBER = 101;
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*
* @return Whether the jsonFileFormat field is set.
*/
@java.lang.Override
public boolean hasJsonFileFormat() {
return fileFormatCase_ == 101;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*
* @return The jsonFileFormat.
*/
@java.lang.Override
public com.google.cloud.datastream.v1.JsonFileFormat getJsonFileFormat() {
if (fileFormatCase_ == 101) {
return (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
@java.lang.Override
public com.google.cloud.datastream.v1.JsonFileFormatOrBuilder getJsonFileFormatOrBuilder() {
if (fileFormatCase_ == 101) {
return (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_);
}
if (fileRotationMb_ != 0) {
output.writeInt32(2, fileRotationMb_);
}
if (fileRotationInterval_ != null) {
output.writeMessage(3, getFileRotationInterval());
}
if (fileFormatCase_ == 100) {
output.writeMessage(100, (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_);
}
if (fileFormatCase_ == 101) {
output.writeMessage(101, (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_);
}
if (fileRotationMb_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, fileRotationMb_);
}
if (fileRotationInterval_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFileRotationInterval());
}
if (fileFormatCase_ == 100) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
100, (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_);
}
if (fileFormatCase_ == 101) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
101, (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.datastream.v1.GcsDestinationConfig)) {
return super.equals(obj);
}
com.google.cloud.datastream.v1.GcsDestinationConfig other =
(com.google.cloud.datastream.v1.GcsDestinationConfig) obj;
if (!getPath().equals(other.getPath())) return false;
if (getFileRotationMb() != other.getFileRotationMb()) return false;
if (hasFileRotationInterval() != other.hasFileRotationInterval()) return false;
if (hasFileRotationInterval()) {
if (!getFileRotationInterval().equals(other.getFileRotationInterval())) return false;
}
if (!getFileFormatCase().equals(other.getFileFormatCase())) return false;
switch (fileFormatCase_) {
case 100:
if (!getAvroFileFormat().equals(other.getAvroFileFormat())) return false;
break;
case 101:
if (!getJsonFileFormat().equals(other.getJsonFileFormat())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) 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) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (37 * hash) + FILE_ROTATION_MB_FIELD_NUMBER;
hash = (53 * hash) + getFileRotationMb();
if (hasFileRotationInterval()) {
hash = (37 * hash) + FILE_ROTATION_INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getFileRotationInterval().hashCode();
}
switch (fileFormatCase_) {
case 100:
hash = (37 * hash) + AVRO_FILE_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getAvroFileFormat().hashCode();
break;
case 101:
hash = (37 * hash) + JSON_FILE_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getJsonFileFormat().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig 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.cloud.datastream.v1.GcsDestinationConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig 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.cloud.datastream.v1.GcsDestinationConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig 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.cloud.datastream.v1.GcsDestinationConfig parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig 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.cloud.datastream.v1.GcsDestinationConfig 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;
}
/**
*
*
*
* Google Cloud Storage destination configuration
*
*
* Protobuf type {@code google.cloud.datastream.v1.GcsDestinationConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.GcsDestinationConfig)
com.google.cloud.datastream.v1.GcsDestinationConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.datastream.v1.DatastreamResourcesProto
.internal_static_google_cloud_datastream_v1_GcsDestinationConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.datastream.v1.DatastreamResourcesProto
.internal_static_google_cloud_datastream_v1_GcsDestinationConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.datastream.v1.GcsDestinationConfig.class,
com.google.cloud.datastream.v1.GcsDestinationConfig.Builder.class);
}
// Construct using com.google.cloud.datastream.v1.GcsDestinationConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
path_ = "";
fileRotationMb_ = 0;
if (fileRotationIntervalBuilder_ == null) {
fileRotationInterval_ = null;
} else {
fileRotationInterval_ = null;
fileRotationIntervalBuilder_ = null;
}
fileFormatCase_ = 0;
fileFormat_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.datastream.v1.DatastreamResourcesProto
.internal_static_google_cloud_datastream_v1_GcsDestinationConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.datastream.v1.GcsDestinationConfig getDefaultInstanceForType() {
return com.google.cloud.datastream.v1.GcsDestinationConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.datastream.v1.GcsDestinationConfig build() {
com.google.cloud.datastream.v1.GcsDestinationConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.datastream.v1.GcsDestinationConfig buildPartial() {
com.google.cloud.datastream.v1.GcsDestinationConfig result =
new com.google.cloud.datastream.v1.GcsDestinationConfig(this);
result.path_ = path_;
result.fileRotationMb_ = fileRotationMb_;
if (fileRotationIntervalBuilder_ == null) {
result.fileRotationInterval_ = fileRotationInterval_;
} else {
result.fileRotationInterval_ = fileRotationIntervalBuilder_.build();
}
if (fileFormatCase_ == 100) {
if (avroFileFormatBuilder_ == null) {
result.fileFormat_ = fileFormat_;
} else {
result.fileFormat_ = avroFileFormatBuilder_.build();
}
}
if (fileFormatCase_ == 101) {
if (jsonFileFormatBuilder_ == null) {
result.fileFormat_ = fileFormat_;
} else {
result.fileFormat_ = jsonFileFormatBuilder_.build();
}
}
result.fileFormatCase_ = fileFormatCase_;
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.cloud.datastream.v1.GcsDestinationConfig) {
return mergeFrom((com.google.cloud.datastream.v1.GcsDestinationConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.datastream.v1.GcsDestinationConfig other) {
if (other == com.google.cloud.datastream.v1.GcsDestinationConfig.getDefaultInstance())
return this;
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (other.getFileRotationMb() != 0) {
setFileRotationMb(other.getFileRotationMb());
}
if (other.hasFileRotationInterval()) {
mergeFileRotationInterval(other.getFileRotationInterval());
}
switch (other.getFileFormatCase()) {
case AVRO_FILE_FORMAT:
{
mergeAvroFileFormat(other.getAvroFileFormat());
break;
}
case JSON_FILE_FORMAT:
{
mergeJsonFileFormat(other.getJsonFileFormat());
break;
}
case FILEFORMAT_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.cloud.datastream.v1.GcsDestinationConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.datastream.v1.GcsDestinationConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int fileFormatCase_ = 0;
private java.lang.Object fileFormat_;
public FileFormatCase getFileFormatCase() {
return FileFormatCase.forNumber(fileFormatCase_);
}
public Builder clearFileFormat() {
fileFormatCase_ = 0;
fileFormat_ = null;
onChanged();
return this;
}
private java.lang.Object path_ = "";
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @return The path.
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @return The bytes for path.
*/
public com.google.protobuf.ByteString getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @param value The path to set.
* @return This builder for chaining.
*/
public Builder setPath(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @return This builder for chaining.
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
*
*
* Path inside the Cloud Storage bucket to write data to.
*
*
* string path = 1;
*
* @param value The bytes for path to set.
* @return This builder for chaining.
*/
public Builder setPathBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
private int fileRotationMb_;
/**
*
*
*
* The maximum file size to be saved in the bucket.
*
*
* int32 file_rotation_mb = 2;
*
* @return The fileRotationMb.
*/
@java.lang.Override
public int getFileRotationMb() {
return fileRotationMb_;
}
/**
*
*
*
* The maximum file size to be saved in the bucket.
*
*
* int32 file_rotation_mb = 2;
*
* @param value The fileRotationMb to set.
* @return This builder for chaining.
*/
public Builder setFileRotationMb(int value) {
fileRotationMb_ = value;
onChanged();
return this;
}
/**
*
*
*
* The maximum file size to be saved in the bucket.
*
*
* int32 file_rotation_mb = 2;
*
* @return This builder for chaining.
*/
public Builder clearFileRotationMb() {
fileRotationMb_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration fileRotationInterval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
fileRotationIntervalBuilder_;
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*
* @return Whether the fileRotationInterval field is set.
*/
public boolean hasFileRotationInterval() {
return fileRotationIntervalBuilder_ != null || fileRotationInterval_ != null;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*
* @return The fileRotationInterval.
*/
public com.google.protobuf.Duration getFileRotationInterval() {
if (fileRotationIntervalBuilder_ == null) {
return fileRotationInterval_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: fileRotationInterval_;
} else {
return fileRotationIntervalBuilder_.getMessage();
}
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public Builder setFileRotationInterval(com.google.protobuf.Duration value) {
if (fileRotationIntervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileRotationInterval_ = value;
onChanged();
} else {
fileRotationIntervalBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public Builder setFileRotationInterval(com.google.protobuf.Duration.Builder builderForValue) {
if (fileRotationIntervalBuilder_ == null) {
fileRotationInterval_ = builderForValue.build();
onChanged();
} else {
fileRotationIntervalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public Builder mergeFileRotationInterval(com.google.protobuf.Duration value) {
if (fileRotationIntervalBuilder_ == null) {
if (fileRotationInterval_ != null) {
fileRotationInterval_ =
com.google.protobuf.Duration.newBuilder(fileRotationInterval_)
.mergeFrom(value)
.buildPartial();
} else {
fileRotationInterval_ = value;
}
onChanged();
} else {
fileRotationIntervalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public Builder clearFileRotationInterval() {
if (fileRotationIntervalBuilder_ == null) {
fileRotationInterval_ = null;
onChanged();
} else {
fileRotationInterval_ = null;
fileRotationIntervalBuilder_ = null;
}
return this;
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public com.google.protobuf.Duration.Builder getFileRotationIntervalBuilder() {
onChanged();
return getFileRotationIntervalFieldBuilder().getBuilder();
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
public com.google.protobuf.DurationOrBuilder getFileRotationIntervalOrBuilder() {
if (fileRotationIntervalBuilder_ != null) {
return fileRotationIntervalBuilder_.getMessageOrBuilder();
} else {
return fileRotationInterval_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: fileRotationInterval_;
}
}
/**
*
*
*
* The maximum duration for which new events are added before a file is
* closed and a new file is created.
*
*
* .google.protobuf.Duration file_rotation_interval = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getFileRotationIntervalFieldBuilder() {
if (fileRotationIntervalBuilder_ == null) {
fileRotationIntervalBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getFileRotationInterval(), getParentForChildren(), isClean());
fileRotationInterval_ = null;
}
return fileRotationIntervalBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.AvroFileFormat,
com.google.cloud.datastream.v1.AvroFileFormat.Builder,
com.google.cloud.datastream.v1.AvroFileFormatOrBuilder>
avroFileFormatBuilder_;
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*
* @return Whether the avroFileFormat field is set.
*/
@java.lang.Override
public boolean hasAvroFileFormat() {
return fileFormatCase_ == 100;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*
* @return The avroFileFormat.
*/
@java.lang.Override
public com.google.cloud.datastream.v1.AvroFileFormat getAvroFileFormat() {
if (avroFileFormatBuilder_ == null) {
if (fileFormatCase_ == 100) {
return (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
} else {
if (fileFormatCase_ == 100) {
return avroFileFormatBuilder_.getMessage();
}
return com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
}
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
public Builder setAvroFileFormat(com.google.cloud.datastream.v1.AvroFileFormat value) {
if (avroFileFormatBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileFormat_ = value;
onChanged();
} else {
avroFileFormatBuilder_.setMessage(value);
}
fileFormatCase_ = 100;
return this;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
public Builder setAvroFileFormat(
com.google.cloud.datastream.v1.AvroFileFormat.Builder builderForValue) {
if (avroFileFormatBuilder_ == null) {
fileFormat_ = builderForValue.build();
onChanged();
} else {
avroFileFormatBuilder_.setMessage(builderForValue.build());
}
fileFormatCase_ = 100;
return this;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
public Builder mergeAvroFileFormat(com.google.cloud.datastream.v1.AvroFileFormat value) {
if (avroFileFormatBuilder_ == null) {
if (fileFormatCase_ == 100
&& fileFormat_ != com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance()) {
fileFormat_ =
com.google.cloud.datastream.v1.AvroFileFormat.newBuilder(
(com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_)
.mergeFrom(value)
.buildPartial();
} else {
fileFormat_ = value;
}
onChanged();
} else {
if (fileFormatCase_ == 100) {
avroFileFormatBuilder_.mergeFrom(value);
}
avroFileFormatBuilder_.setMessage(value);
}
fileFormatCase_ = 100;
return this;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
public Builder clearAvroFileFormat() {
if (avroFileFormatBuilder_ == null) {
if (fileFormatCase_ == 100) {
fileFormatCase_ = 0;
fileFormat_ = null;
onChanged();
}
} else {
if (fileFormatCase_ == 100) {
fileFormatCase_ = 0;
fileFormat_ = null;
}
avroFileFormatBuilder_.clear();
}
return this;
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
public com.google.cloud.datastream.v1.AvroFileFormat.Builder getAvroFileFormatBuilder() {
return getAvroFileFormatFieldBuilder().getBuilder();
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
@java.lang.Override
public com.google.cloud.datastream.v1.AvroFileFormatOrBuilder getAvroFileFormatOrBuilder() {
if ((fileFormatCase_ == 100) && (avroFileFormatBuilder_ != null)) {
return avroFileFormatBuilder_.getMessageOrBuilder();
} else {
if (fileFormatCase_ == 100) {
return (com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
}
}
/**
*
*
*
* AVRO file format configuration.
*
*
* .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.AvroFileFormat,
com.google.cloud.datastream.v1.AvroFileFormat.Builder,
com.google.cloud.datastream.v1.AvroFileFormatOrBuilder>
getAvroFileFormatFieldBuilder() {
if (avroFileFormatBuilder_ == null) {
if (!(fileFormatCase_ == 100)) {
fileFormat_ = com.google.cloud.datastream.v1.AvroFileFormat.getDefaultInstance();
}
avroFileFormatBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.AvroFileFormat,
com.google.cloud.datastream.v1.AvroFileFormat.Builder,
com.google.cloud.datastream.v1.AvroFileFormatOrBuilder>(
(com.google.cloud.datastream.v1.AvroFileFormat) fileFormat_,
getParentForChildren(),
isClean());
fileFormat_ = null;
}
fileFormatCase_ = 100;
onChanged();
;
return avroFileFormatBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.JsonFileFormat,
com.google.cloud.datastream.v1.JsonFileFormat.Builder,
com.google.cloud.datastream.v1.JsonFileFormatOrBuilder>
jsonFileFormatBuilder_;
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*
* @return Whether the jsonFileFormat field is set.
*/
@java.lang.Override
public boolean hasJsonFileFormat() {
return fileFormatCase_ == 101;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*
* @return The jsonFileFormat.
*/
@java.lang.Override
public com.google.cloud.datastream.v1.JsonFileFormat getJsonFileFormat() {
if (jsonFileFormatBuilder_ == null) {
if (fileFormatCase_ == 101) {
return (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
} else {
if (fileFormatCase_ == 101) {
return jsonFileFormatBuilder_.getMessage();
}
return com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
}
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
public Builder setJsonFileFormat(com.google.cloud.datastream.v1.JsonFileFormat value) {
if (jsonFileFormatBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileFormat_ = value;
onChanged();
} else {
jsonFileFormatBuilder_.setMessage(value);
}
fileFormatCase_ = 101;
return this;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
public Builder setJsonFileFormat(
com.google.cloud.datastream.v1.JsonFileFormat.Builder builderForValue) {
if (jsonFileFormatBuilder_ == null) {
fileFormat_ = builderForValue.build();
onChanged();
} else {
jsonFileFormatBuilder_.setMessage(builderForValue.build());
}
fileFormatCase_ = 101;
return this;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
public Builder mergeJsonFileFormat(com.google.cloud.datastream.v1.JsonFileFormat value) {
if (jsonFileFormatBuilder_ == null) {
if (fileFormatCase_ == 101
&& fileFormat_ != com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance()) {
fileFormat_ =
com.google.cloud.datastream.v1.JsonFileFormat.newBuilder(
(com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_)
.mergeFrom(value)
.buildPartial();
} else {
fileFormat_ = value;
}
onChanged();
} else {
if (fileFormatCase_ == 101) {
jsonFileFormatBuilder_.mergeFrom(value);
}
jsonFileFormatBuilder_.setMessage(value);
}
fileFormatCase_ = 101;
return this;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
public Builder clearJsonFileFormat() {
if (jsonFileFormatBuilder_ == null) {
if (fileFormatCase_ == 101) {
fileFormatCase_ = 0;
fileFormat_ = null;
onChanged();
}
} else {
if (fileFormatCase_ == 101) {
fileFormatCase_ = 0;
fileFormat_ = null;
}
jsonFileFormatBuilder_.clear();
}
return this;
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
public com.google.cloud.datastream.v1.JsonFileFormat.Builder getJsonFileFormatBuilder() {
return getJsonFileFormatFieldBuilder().getBuilder();
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
@java.lang.Override
public com.google.cloud.datastream.v1.JsonFileFormatOrBuilder getJsonFileFormatOrBuilder() {
if ((fileFormatCase_ == 101) && (jsonFileFormatBuilder_ != null)) {
return jsonFileFormatBuilder_.getMessageOrBuilder();
} else {
if (fileFormatCase_ == 101) {
return (com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_;
}
return com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
}
}
/**
*
*
*
* JSON file format configuration.
*
*
* .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.JsonFileFormat,
com.google.cloud.datastream.v1.JsonFileFormat.Builder,
com.google.cloud.datastream.v1.JsonFileFormatOrBuilder>
getJsonFileFormatFieldBuilder() {
if (jsonFileFormatBuilder_ == null) {
if (!(fileFormatCase_ == 101)) {
fileFormat_ = com.google.cloud.datastream.v1.JsonFileFormat.getDefaultInstance();
}
jsonFileFormatBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.datastream.v1.JsonFileFormat,
com.google.cloud.datastream.v1.JsonFileFormat.Builder,
com.google.cloud.datastream.v1.JsonFileFormatOrBuilder>(
(com.google.cloud.datastream.v1.JsonFileFormat) fileFormat_,
getParentForChildren(),
isClean());
fileFormat_ = null;
}
fileFormatCase_ = 101;
onChanged();
;
return jsonFileFormatBuilder_;
}
@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.cloud.datastream.v1.GcsDestinationConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.GcsDestinationConfig)
private static final com.google.cloud.datastream.v1.GcsDestinationConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.GcsDestinationConfig();
}
public static com.google.cloud.datastream.v1.GcsDestinationConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GcsDestinationConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GcsDestinationConfig(input, extensionRegistry);
}
};
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.cloud.datastream.v1.GcsDestinationConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy