All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.datastream.v1.Stream Maven / Gradle / Ivy

There is a newer version: 1.53.0
Show newest version
/*
 * 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;

/**
 *
 *
 * 
 * A resource representing streaming data from a source to a destination.
 * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream} */ public final class Stream extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.Stream) StreamOrBuilder { private static final long serialVersionUID = 0L; // Use Stream.newBuilder() to construct. private Stream(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Stream() { name_ = ""; displayName_ = ""; state_ = 0; errors_ = java.util.Collections.emptyList(); customerManagedEncryptionKey_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Stream(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Stream( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; 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(); name_ = s; break; } case 18: { com.google.protobuf.Timestamp.Builder subBuilder = null; if (createTime_ != null) { subBuilder = createTime_.toBuilder(); } createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(createTime_); createTime_ = subBuilder.buildPartial(); } break; } case 26: { com.google.protobuf.Timestamp.Builder subBuilder = null; if (updateTime_ != null) { subBuilder = updateTime_.toBuilder(); } updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(updateTime_); updateTime_ = subBuilder.buildPartial(); } break; } case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 50: { com.google.cloud.datastream.v1.SourceConfig.Builder subBuilder = null; if (sourceConfig_ != null) { subBuilder = sourceConfig_.toBuilder(); } sourceConfig_ = input.readMessage( com.google.cloud.datastream.v1.SourceConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(sourceConfig_); sourceConfig_ = subBuilder.buildPartial(); } break; } case 58: { com.google.cloud.datastream.v1.DestinationConfig.Builder subBuilder = null; if (destinationConfig_ != null) { subBuilder = destinationConfig_.toBuilder(); } destinationConfig_ = input.readMessage( com.google.cloud.datastream.v1.DestinationConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(destinationConfig_); destinationConfig_ = subBuilder.buildPartial(); } break; } case 64: { int rawValue = input.readEnum(); state_ = rawValue; break; } case 74: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { errors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } errors_.add( input.readMessage( com.google.cloud.datastream.v1.Error.parser(), extensionRegistry)); break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; customerManagedEncryptionKey_ = s; break; } case 810: { com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder subBuilder = null; if (backfillStrategyCase_ == 101) { subBuilder = ((com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_) .toBuilder(); } backfillStrategy_ = input.readMessage( com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom( (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_); backfillStrategy_ = subBuilder.buildPartial(); } backfillStrategyCase_ = 101; break; } case 818: { com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder subBuilder = null; if (backfillStrategyCase_ == 102) { subBuilder = ((com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_) .toBuilder(); } backfillStrategy_ = input.readMessage( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom( (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_); backfillStrategy_ = subBuilder.buildPartial(); } backfillStrategyCase_ = 102; 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 { if (((mutable_bitField0_ & 0x00000002) != 0)) { errors_ = java.util.Collections.unmodifiableList(errors_); } 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_Stream_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 4: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.class, com.google.cloud.datastream.v1.Stream.Builder.class); } /** * * *
   * Stream state.
   * 
* * Protobuf enum {@code google.cloud.datastream.v1.Stream.State} */ public enum State implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified stream state.
     * 
* * STATE_UNSPECIFIED = 0; */ STATE_UNSPECIFIED(0), /** * * *
     * The stream has been created but has not yet started streaming data.
     * 
* * NOT_STARTED = 1; */ NOT_STARTED(1), /** * * *
     * The stream is running.
     * 
* * RUNNING = 2; */ RUNNING(2), /** * * *
     * The stream is paused.
     * 
* * PAUSED = 3; */ PAUSED(3), /** * * *
     * The stream is in maintenance mode.
     * Updates are rejected on the resource in this state.
     * 
* * MAINTENANCE = 4; */ MAINTENANCE(4), /** * * *
     * The stream is experiencing an error that is preventing data from being
     * streamed.
     * 
* * FAILED = 5; */ FAILED(5), /** * * *
     * The stream has experienced a terminal failure.
     * 
* * FAILED_PERMANENTLY = 6; */ FAILED_PERMANENTLY(6), /** * * *
     * The stream is starting, but not yet running.
     * 
* * STARTING = 7; */ STARTING(7), /** * * *
     * The Stream is no longer reading new events, but still writing events in
     * the buffer.
     * 
* * DRAINING = 8; */ DRAINING(8), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified stream state.
     * 
* * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The stream has been created but has not yet started streaming data.
     * 
* * NOT_STARTED = 1; */ public static final int NOT_STARTED_VALUE = 1; /** * * *
     * The stream is running.
     * 
* * RUNNING = 2; */ public static final int RUNNING_VALUE = 2; /** * * *
     * The stream is paused.
     * 
* * PAUSED = 3; */ public static final int PAUSED_VALUE = 3; /** * * *
     * The stream is in maintenance mode.
     * Updates are rejected on the resource in this state.
     * 
* * MAINTENANCE = 4; */ public static final int MAINTENANCE_VALUE = 4; /** * * *
     * The stream is experiencing an error that is preventing data from being
     * streamed.
     * 
* * FAILED = 5; */ public static final int FAILED_VALUE = 5; /** * * *
     * The stream has experienced a terminal failure.
     * 
* * FAILED_PERMANENTLY = 6; */ public static final int FAILED_PERMANENTLY_VALUE = 6; /** * * *
     * The stream is starting, but not yet running.
     * 
* * STARTING = 7; */ public static final int STARTING_VALUE = 7; /** * * *
     * The Stream is no longer reading new events, but still writing events in
     * the buffer.
     * 
* * DRAINING = 8; */ public static final int DRAINING_VALUE = 8; 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 NOT_STARTED; case 2: return RUNNING; case 3: return PAUSED; case 4: return MAINTENANCE; case 5: return FAILED; case 6: return FAILED_PERMANENTLY; case 7: return STARTING; case 8: return DRAINING; 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.cloud.datastream.v1.Stream.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.cloud.datastream.v1.Stream.State) } public interface BackfillAllStrategyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.datastream.v1.Stream.BackfillAllStrategy) com.google.protobuf.MessageOrBuilder { /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return Whether the oracleExcludedObjects field is set. */ boolean hasOracleExcludedObjects(); /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return The oracleExcludedObjects. */ com.google.cloud.datastream.v1.OracleRdbms getOracleExcludedObjects(); /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ com.google.cloud.datastream.v1.OracleRdbmsOrBuilder getOracleExcludedObjectsOrBuilder(); /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return Whether the mysqlExcludedObjects field is set. */ boolean hasMysqlExcludedObjects(); /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return The mysqlExcludedObjects. */ com.google.cloud.datastream.v1.MysqlRdbms getMysqlExcludedObjects(); /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder getMysqlExcludedObjectsOrBuilder(); public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.ExcludedObjectsCase getExcludedObjectsCase(); } /** * * *
   * Backfill strategy to automatically backfill the Stream's objects.
   * Specific objects can be excluded.
   * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream.BackfillAllStrategy} */ public static final class BackfillAllStrategy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.Stream.BackfillAllStrategy) BackfillAllStrategyOrBuilder { private static final long serialVersionUID = 0L; // Use BackfillAllStrategy.newBuilder() to construct. private BackfillAllStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BackfillAllStrategy() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BackfillAllStrategy(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BackfillAllStrategy( 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: { com.google.cloud.datastream.v1.OracleRdbms.Builder subBuilder = null; if (excludedObjectsCase_ == 1) { subBuilder = ((com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_).toBuilder(); } excludedObjects_ = input.readMessage( com.google.cloud.datastream.v1.OracleRdbms.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom( (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_); excludedObjects_ = subBuilder.buildPartial(); } excludedObjectsCase_ = 1; break; } case 18: { com.google.cloud.datastream.v1.MysqlRdbms.Builder subBuilder = null; if (excludedObjectsCase_ == 2) { subBuilder = ((com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_).toBuilder(); } excludedObjects_ = input.readMessage( com.google.cloud.datastream.v1.MysqlRdbms.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom( (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_); excludedObjects_ = subBuilder.buildPartial(); } excludedObjectsCase_ = 2; 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_Stream_BackfillAllStrategy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillAllStrategy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.class, com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder.class); } private int excludedObjectsCase_ = 0; private java.lang.Object excludedObjects_; public enum ExcludedObjectsCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { ORACLE_EXCLUDED_OBJECTS(1), MYSQL_EXCLUDED_OBJECTS(2), EXCLUDEDOBJECTS_NOT_SET(0); private final int value; private ExcludedObjectsCase(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 ExcludedObjectsCase valueOf(int value) { return forNumber(value); } public static ExcludedObjectsCase forNumber(int value) { switch (value) { case 1: return ORACLE_EXCLUDED_OBJECTS; case 2: return MYSQL_EXCLUDED_OBJECTS; case 0: return EXCLUDEDOBJECTS_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ExcludedObjectsCase getExcludedObjectsCase() { return ExcludedObjectsCase.forNumber(excludedObjectsCase_); } public static final int ORACLE_EXCLUDED_OBJECTS_FIELD_NUMBER = 1; /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return Whether the oracleExcludedObjects field is set. */ @java.lang.Override public boolean hasOracleExcludedObjects() { return excludedObjectsCase_ == 1; } /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return The oracleExcludedObjects. */ @java.lang.Override public com.google.cloud.datastream.v1.OracleRdbms getOracleExcludedObjects() { if (excludedObjectsCase_ == 1) { return (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } /** * * *
     * Oracle data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ @java.lang.Override public com.google.cloud.datastream.v1.OracleRdbmsOrBuilder getOracleExcludedObjectsOrBuilder() { if (excludedObjectsCase_ == 1) { return (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } public static final int MYSQL_EXCLUDED_OBJECTS_FIELD_NUMBER = 2; /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return Whether the mysqlExcludedObjects field is set. */ @java.lang.Override public boolean hasMysqlExcludedObjects() { return excludedObjectsCase_ == 2; } /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return The mysqlExcludedObjects. */ @java.lang.Override public com.google.cloud.datastream.v1.MysqlRdbms getMysqlExcludedObjects() { if (excludedObjectsCase_ == 2) { return (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance(); } /** * * *
     * MySQL data source objects to avoid backfilling.
     * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ @java.lang.Override public com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder getMysqlExcludedObjectsOrBuilder() { if (excludedObjectsCase_ == 2) { return (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.MysqlRdbms.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 (excludedObjectsCase_ == 1) { output.writeMessage(1, (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_); } if (excludedObjectsCase_ == 2) { output.writeMessage(2, (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (excludedObjectsCase_ == 1) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_); } if (excludedObjectsCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_); } 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.Stream.BackfillAllStrategy)) { return super.equals(obj); } com.google.cloud.datastream.v1.Stream.BackfillAllStrategy other = (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) obj; if (!getExcludedObjectsCase().equals(other.getExcludedObjectsCase())) return false; switch (excludedObjectsCase_) { case 1: if (!getOracleExcludedObjects().equals(other.getOracleExcludedObjects())) return false; break; case 2: if (!getMysqlExcludedObjects().equals(other.getMysqlExcludedObjects())) 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(); switch (excludedObjectsCase_) { case 1: hash = (37 * hash) + ORACLE_EXCLUDED_OBJECTS_FIELD_NUMBER; hash = (53 * hash) + getOracleExcludedObjects().hashCode(); break; case 2: hash = (37 * hash) + MYSQL_EXCLUDED_OBJECTS_FIELD_NUMBER; hash = (53 * hash) + getMysqlExcludedObjects().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy 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.Stream.BackfillAllStrategy 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; } /** * * *
     * Backfill strategy to automatically backfill the Stream's objects.
     * Specific objects can be excluded.
     * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream.BackfillAllStrategy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.Stream.BackfillAllStrategy) com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillAllStrategy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillAllStrategy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.class, com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder.class); } // Construct using com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.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(); excludedObjectsCase_ = 0; excludedObjects_ = 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_Stream_BackfillAllStrategy_descriptor; } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy getDefaultInstanceForType() { return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy build() { com.google.cloud.datastream.v1.Stream.BackfillAllStrategy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy buildPartial() { com.google.cloud.datastream.v1.Stream.BackfillAllStrategy result = new com.google.cloud.datastream.v1.Stream.BackfillAllStrategy(this); if (excludedObjectsCase_ == 1) { if (oracleExcludedObjectsBuilder_ == null) { result.excludedObjects_ = excludedObjects_; } else { result.excludedObjects_ = oracleExcludedObjectsBuilder_.build(); } } if (excludedObjectsCase_ == 2) { if (mysqlExcludedObjectsBuilder_ == null) { result.excludedObjects_ = excludedObjects_; } else { result.excludedObjects_ = mysqlExcludedObjectsBuilder_.build(); } } result.excludedObjectsCase_ = excludedObjectsCase_; 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.Stream.BackfillAllStrategy) { return mergeFrom((com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.datastream.v1.Stream.BackfillAllStrategy other) { if (other == com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance()) return this; switch (other.getExcludedObjectsCase()) { case ORACLE_EXCLUDED_OBJECTS: { mergeOracleExcludedObjects(other.getOracleExcludedObjects()); break; } case MYSQL_EXCLUDED_OBJECTS: { mergeMysqlExcludedObjects(other.getMysqlExcludedObjects()); break; } case EXCLUDEDOBJECTS_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.Stream.BackfillAllStrategy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int excludedObjectsCase_ = 0; private java.lang.Object excludedObjects_; public ExcludedObjectsCase getExcludedObjectsCase() { return ExcludedObjectsCase.forNumber(excludedObjectsCase_); } public Builder clearExcludedObjects() { excludedObjectsCase_ = 0; excludedObjects_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.OracleRdbms, com.google.cloud.datastream.v1.OracleRdbms.Builder, com.google.cloud.datastream.v1.OracleRdbmsOrBuilder> oracleExcludedObjectsBuilder_; /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return Whether the oracleExcludedObjects field is set. */ @java.lang.Override public boolean hasOracleExcludedObjects() { return excludedObjectsCase_ == 1; } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; * * @return The oracleExcludedObjects. */ @java.lang.Override public com.google.cloud.datastream.v1.OracleRdbms getOracleExcludedObjects() { if (oracleExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 1) { return (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } else { if (excludedObjectsCase_ == 1) { return oracleExcludedObjectsBuilder_.getMessage(); } return com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ public Builder setOracleExcludedObjects(com.google.cloud.datastream.v1.OracleRdbms value) { if (oracleExcludedObjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } excludedObjects_ = value; onChanged(); } else { oracleExcludedObjectsBuilder_.setMessage(value); } excludedObjectsCase_ = 1; return this; } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ public Builder setOracleExcludedObjects( com.google.cloud.datastream.v1.OracleRdbms.Builder builderForValue) { if (oracleExcludedObjectsBuilder_ == null) { excludedObjects_ = builderForValue.build(); onChanged(); } else { oracleExcludedObjectsBuilder_.setMessage(builderForValue.build()); } excludedObjectsCase_ = 1; return this; } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ public Builder mergeOracleExcludedObjects(com.google.cloud.datastream.v1.OracleRdbms value) { if (oracleExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 1 && excludedObjects_ != com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance()) { excludedObjects_ = com.google.cloud.datastream.v1.OracleRdbms.newBuilder( (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_) .mergeFrom(value) .buildPartial(); } else { excludedObjects_ = value; } onChanged(); } else { if (excludedObjectsCase_ == 1) { oracleExcludedObjectsBuilder_.mergeFrom(value); } oracleExcludedObjectsBuilder_.setMessage(value); } excludedObjectsCase_ = 1; return this; } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ public Builder clearOracleExcludedObjects() { if (oracleExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 1) { excludedObjectsCase_ = 0; excludedObjects_ = null; onChanged(); } } else { if (excludedObjectsCase_ == 1) { excludedObjectsCase_ = 0; excludedObjects_ = null; } oracleExcludedObjectsBuilder_.clear(); } return this; } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ public com.google.cloud.datastream.v1.OracleRdbms.Builder getOracleExcludedObjectsBuilder() { return getOracleExcludedObjectsFieldBuilder().getBuilder(); } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ @java.lang.Override public com.google.cloud.datastream.v1.OracleRdbmsOrBuilder getOracleExcludedObjectsOrBuilder() { if ((excludedObjectsCase_ == 1) && (oracleExcludedObjectsBuilder_ != null)) { return oracleExcludedObjectsBuilder_.getMessageOrBuilder(); } else { if (excludedObjectsCase_ == 1) { return (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } } /** * * *
       * Oracle data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.OracleRdbms, com.google.cloud.datastream.v1.OracleRdbms.Builder, com.google.cloud.datastream.v1.OracleRdbmsOrBuilder> getOracleExcludedObjectsFieldBuilder() { if (oracleExcludedObjectsBuilder_ == null) { if (!(excludedObjectsCase_ == 1)) { excludedObjects_ = com.google.cloud.datastream.v1.OracleRdbms.getDefaultInstance(); } oracleExcludedObjectsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.OracleRdbms, com.google.cloud.datastream.v1.OracleRdbms.Builder, com.google.cloud.datastream.v1.OracleRdbmsOrBuilder>( (com.google.cloud.datastream.v1.OracleRdbms) excludedObjects_, getParentForChildren(), isClean()); excludedObjects_ = null; } excludedObjectsCase_ = 1; onChanged(); ; return oracleExcludedObjectsBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.MysqlRdbms, com.google.cloud.datastream.v1.MysqlRdbms.Builder, com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder> mysqlExcludedObjectsBuilder_; /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return Whether the mysqlExcludedObjects field is set. */ @java.lang.Override public boolean hasMysqlExcludedObjects() { return excludedObjectsCase_ == 2; } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; * * @return The mysqlExcludedObjects. */ @java.lang.Override public com.google.cloud.datastream.v1.MysqlRdbms getMysqlExcludedObjects() { if (mysqlExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 2) { return (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance(); } else { if (excludedObjectsCase_ == 2) { return mysqlExcludedObjectsBuilder_.getMessage(); } return com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance(); } } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ public Builder setMysqlExcludedObjects(com.google.cloud.datastream.v1.MysqlRdbms value) { if (mysqlExcludedObjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } excludedObjects_ = value; onChanged(); } else { mysqlExcludedObjectsBuilder_.setMessage(value); } excludedObjectsCase_ = 2; return this; } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ public Builder setMysqlExcludedObjects( com.google.cloud.datastream.v1.MysqlRdbms.Builder builderForValue) { if (mysqlExcludedObjectsBuilder_ == null) { excludedObjects_ = builderForValue.build(); onChanged(); } else { mysqlExcludedObjectsBuilder_.setMessage(builderForValue.build()); } excludedObjectsCase_ = 2; return this; } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ public Builder mergeMysqlExcludedObjects(com.google.cloud.datastream.v1.MysqlRdbms value) { if (mysqlExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 2 && excludedObjects_ != com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance()) { excludedObjects_ = com.google.cloud.datastream.v1.MysqlRdbms.newBuilder( (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_) .mergeFrom(value) .buildPartial(); } else { excludedObjects_ = value; } onChanged(); } else { if (excludedObjectsCase_ == 2) { mysqlExcludedObjectsBuilder_.mergeFrom(value); } mysqlExcludedObjectsBuilder_.setMessage(value); } excludedObjectsCase_ = 2; return this; } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ public Builder clearMysqlExcludedObjects() { if (mysqlExcludedObjectsBuilder_ == null) { if (excludedObjectsCase_ == 2) { excludedObjectsCase_ = 0; excludedObjects_ = null; onChanged(); } } else { if (excludedObjectsCase_ == 2) { excludedObjectsCase_ = 0; excludedObjects_ = null; } mysqlExcludedObjectsBuilder_.clear(); } return this; } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ public com.google.cloud.datastream.v1.MysqlRdbms.Builder getMysqlExcludedObjectsBuilder() { return getMysqlExcludedObjectsFieldBuilder().getBuilder(); } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ @java.lang.Override public com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder getMysqlExcludedObjectsOrBuilder() { if ((excludedObjectsCase_ == 2) && (mysqlExcludedObjectsBuilder_ != null)) { return mysqlExcludedObjectsBuilder_.getMessageOrBuilder(); } else { if (excludedObjectsCase_ == 2) { return (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_; } return com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance(); } } /** * * *
       * MySQL data source objects to avoid backfilling.
       * 
* * .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.MysqlRdbms, com.google.cloud.datastream.v1.MysqlRdbms.Builder, com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder> getMysqlExcludedObjectsFieldBuilder() { if (mysqlExcludedObjectsBuilder_ == null) { if (!(excludedObjectsCase_ == 2)) { excludedObjects_ = com.google.cloud.datastream.v1.MysqlRdbms.getDefaultInstance(); } mysqlExcludedObjectsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.MysqlRdbms, com.google.cloud.datastream.v1.MysqlRdbms.Builder, com.google.cloud.datastream.v1.MysqlRdbmsOrBuilder>( (com.google.cloud.datastream.v1.MysqlRdbms) excludedObjects_, getParentForChildren(), isClean()); excludedObjects_ = null; } excludedObjectsCase_ = 2; onChanged(); ; return mysqlExcludedObjectsBuilder_; } @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.Stream.BackfillAllStrategy) } // @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.Stream.BackfillAllStrategy) private static final com.google.cloud.datastream.v1.Stream.BackfillAllStrategy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.Stream.BackfillAllStrategy(); } public static com.google.cloud.datastream.v1.Stream.BackfillAllStrategy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BackfillAllStrategy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BackfillAllStrategy(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.Stream.BackfillAllStrategy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface BackfillNoneStrategyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.datastream.v1.Stream.BackfillNoneStrategy) com.google.protobuf.MessageOrBuilder {} /** * * *
   * Backfill strategy to disable automatic backfill for the Stream's objects.
   * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream.BackfillNoneStrategy} */ public static final class BackfillNoneStrategy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.Stream.BackfillNoneStrategy) BackfillNoneStrategyOrBuilder { private static final long serialVersionUID = 0L; // Use BackfillNoneStrategy.newBuilder() to construct. private BackfillNoneStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BackfillNoneStrategy() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BackfillNoneStrategy(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BackfillNoneStrategy( 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; 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_Stream_BackfillNoneStrategy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillNoneStrategy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.class, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.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 { unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; 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.Stream.BackfillNoneStrategy)) { return super.equals(obj); } com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy other = (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) obj; 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 = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy 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.Stream.BackfillNoneStrategy 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; } /** * * *
     * Backfill strategy to disable automatic backfill for the Stream's objects.
     * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream.BackfillNoneStrategy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.Stream.BackfillNoneStrategy) com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillNoneStrategy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_BackfillNoneStrategy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.class, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder.class); } // Construct using com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.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(); 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_Stream_BackfillNoneStrategy_descriptor; } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy getDefaultInstanceForType() { return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy build() { com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy buildPartial() { com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy result = new com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(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.cloud.datastream.v1.Stream.BackfillNoneStrategy) { return mergeFrom((com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy other) { if (other == com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance()) return this; 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.Stream.BackfillNoneStrategy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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.cloud.datastream.v1.Stream.BackfillNoneStrategy) } // @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.Stream.BackfillNoneStrategy) private static final com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(); } public static com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BackfillNoneStrategy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BackfillNoneStrategy(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.Stream.BackfillNoneStrategy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; private int backfillStrategyCase_ = 0; private java.lang.Object backfillStrategy_; public enum BackfillStrategyCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { BACKFILL_ALL(101), BACKFILL_NONE(102), BACKFILLSTRATEGY_NOT_SET(0); private final int value; private BackfillStrategyCase(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 BackfillStrategyCase valueOf(int value) { return forNumber(value); } public static BackfillStrategyCase forNumber(int value) { switch (value) { case 101: return BACKFILL_ALL; case 102: return BACKFILL_NONE; case 0: return BACKFILLSTRATEGY_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public BackfillStrategyCase getBackfillStrategyCase() { return BackfillStrategyCase.forNumber(backfillStrategyCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * * *
   * Output only. The stream's name.
   * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** * * *
   * Output only. The stream's name.
   * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. The creation time of the stream.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } /** * * *
   * Output only. The creation time of the stream.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * Output only. The creation time of the stream.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } public static final int UPDATE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp updateTime_; /** * * *
   * Output only. The last update time of the stream.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } /** * * *
   * Output only. The last update time of the stream.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
   * Output only. The last update time of the stream.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } public static final int LABELS_FIELD_NUMBER = 4; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * Labels.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * Labels.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Labels.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Labels.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int DISPLAY_NAME_FIELD_NUMBER = 5; private volatile java.lang.Object displayName_; /** * * *
   * Required. Display name.
   * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; 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(); displayName_ = s; return s; } } /** * * *
   * Required. Display name.
   * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SOURCE_CONFIG_FIELD_NUMBER = 6; private com.google.cloud.datastream.v1.SourceConfig sourceConfig_; /** * * *
   * Required. Source connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the sourceConfig field is set. */ @java.lang.Override public boolean hasSourceConfig() { return sourceConfig_ != null; } /** * * *
   * Required. Source connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return The sourceConfig. */ @java.lang.Override public com.google.cloud.datastream.v1.SourceConfig getSourceConfig() { return sourceConfig_ == null ? com.google.cloud.datastream.v1.SourceConfig.getDefaultInstance() : sourceConfig_; } /** * * *
   * Required. Source connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.datastream.v1.SourceConfigOrBuilder getSourceConfigOrBuilder() { return getSourceConfig(); } public static final int DESTINATION_CONFIG_FIELD_NUMBER = 7; private com.google.cloud.datastream.v1.DestinationConfig destinationConfig_; /** * * *
   * Required. Destination connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the destinationConfig field is set. */ @java.lang.Override public boolean hasDestinationConfig() { return destinationConfig_ != null; } /** * * *
   * Required. Destination connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * * * @return The destinationConfig. */ @java.lang.Override public com.google.cloud.datastream.v1.DestinationConfig getDestinationConfig() { return destinationConfig_ == null ? com.google.cloud.datastream.v1.DestinationConfig.getDefaultInstance() : destinationConfig_; } /** * * *
   * Required. Destination connection profile configuration.
   * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.datastream.v1.DestinationConfigOrBuilder getDestinationConfigOrBuilder() { return getDestinationConfig(); } public static final int STATE_FIELD_NUMBER = 8; private int state_; /** * * *
   * The state of the stream.
   * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
   * The state of the stream.
   * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @return The state. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.State getState() { @SuppressWarnings("deprecation") com.google.cloud.datastream.v1.Stream.State result = com.google.cloud.datastream.v1.Stream.State.valueOf(state_); return result == null ? com.google.cloud.datastream.v1.Stream.State.UNRECOGNIZED : result; } public static final int BACKFILL_ALL_FIELD_NUMBER = 101; /** * * *
   * Automatically backfill objects included in the stream source
   * configuration. Specific objects can be excluded.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; * * @return Whether the backfillAll field is set. */ @java.lang.Override public boolean hasBackfillAll() { return backfillStrategyCase_ == 101; } /** * * *
   * Automatically backfill objects included in the stream source
   * configuration. Specific objects can be excluded.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; * * @return The backfillAll. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy getBackfillAll() { if (backfillStrategyCase_ == 101) { return (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } /** * * *
   * Automatically backfill objects included in the stream source
   * configuration. Specific objects can be excluded.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder getBackfillAllOrBuilder() { if (backfillStrategyCase_ == 101) { return (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } public static final int BACKFILL_NONE_FIELD_NUMBER = 102; /** * * *
   * Do not automatically backfill any objects.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; * * @return Whether the backfillNone field is set. */ @java.lang.Override public boolean hasBackfillNone() { return backfillStrategyCase_ == 102; } /** * * *
   * Do not automatically backfill any objects.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; * * @return The backfillNone. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy getBackfillNone() { if (backfillStrategyCase_ == 102) { return (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } /** * * *
   * Do not automatically backfill any objects.
   * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder getBackfillNoneOrBuilder() { if (backfillStrategyCase_ == 102) { return (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } public static final int ERRORS_FIELD_NUMBER = 9; private java.util.List errors_; /** * * *
   * Output only. Errors on the Stream.
   * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getErrorsList() { return errors_; } /** * * *
   * Output only. Errors on the Stream.
   * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getErrorsOrBuilderList() { return errors_; } /** * * *
   * Output only. Errors on the Stream.
   * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public int getErrorsCount() { return errors_.size(); } /** * * *
   * Output only. Errors on the Stream.
   * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.datastream.v1.Error getErrors(int index) { return errors_.get(index); } /** * * *
   * Output only. Errors on the Stream.
   * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.datastream.v1.ErrorOrBuilder getErrorsOrBuilder(int index) { return errors_.get(index); } public static final int CUSTOMER_MANAGED_ENCRYPTION_KEY_FIELD_NUMBER = 10; private volatile java.lang.Object customerManagedEncryptionKey_; /** * * *
   * Immutable. A reference to a KMS encryption key.
   * If provided, it will be used to encrypt the data.
   * If left blank, data will be encrypted using an internal Stream-specific
   * encryption key provisioned through KMS.
   * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return Whether the customerManagedEncryptionKey field is set. */ @java.lang.Override public boolean hasCustomerManagedEncryptionKey() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Immutable. A reference to a KMS encryption key.
   * If provided, it will be used to encrypt the data.
   * If left blank, data will be encrypted using an internal Stream-specific
   * encryption key provisioned through KMS.
   * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The customerManagedEncryptionKey. */ @java.lang.Override public java.lang.String getCustomerManagedEncryptionKey() { java.lang.Object ref = customerManagedEncryptionKey_; 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(); customerManagedEncryptionKey_ = s; return s; } } /** * * *
   * Immutable. A reference to a KMS encryption key.
   * If provided, it will be used to encrypt the data.
   * If left blank, data will be encrypted using an internal Stream-specific
   * encryption key provisioned through KMS.
   * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The bytes for customerManagedEncryptionKey. */ @java.lang.Override public com.google.protobuf.ByteString getCustomerManagedEncryptionKeyBytes() { java.lang.Object ref = customerManagedEncryptionKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); customerManagedEncryptionKey_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (createTime_ != null) { output.writeMessage(2, getCreateTime()); } if (updateTime_ != null) { output.writeMessage(3, getUpdateTime()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } if (sourceConfig_ != null) { output.writeMessage(6, getSourceConfig()); } if (destinationConfig_ != null) { output.writeMessage(7, getDestinationConfig()); } if (state_ != com.google.cloud.datastream.v1.Stream.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(8, state_); } for (int i = 0; i < errors_.size(); i++) { output.writeMessage(9, errors_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, customerManagedEncryptionKey_); } if (backfillStrategyCase_ == 101) { output.writeMessage( 101, (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_); } if (backfillStrategyCase_ == 102) { output.writeMessage( 102, (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_); } 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(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } if (sourceConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSourceConfig()); } if (destinationConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDestinationConfig()); } if (state_ != com.google.cloud.datastream.v1.Stream.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); } for (int i = 0; i < errors_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, errors_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize( 10, customerManagedEncryptionKey_); } if (backfillStrategyCase_ == 101) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 101, (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_); } if (backfillStrategyCase_ == 102) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 102, (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_); } 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.Stream)) { return super.equals(obj); } com.google.cloud.datastream.v1.Stream other = (com.google.cloud.datastream.v1.Stream) obj; if (!getName().equals(other.getName())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (hasSourceConfig() != other.hasSourceConfig()) return false; if (hasSourceConfig()) { if (!getSourceConfig().equals(other.getSourceConfig())) return false; } if (hasDestinationConfig() != other.hasDestinationConfig()) return false; if (hasDestinationConfig()) { if (!getDestinationConfig().equals(other.getDestinationConfig())) return false; } if (state_ != other.state_) return false; if (!getErrorsList().equals(other.getErrorsList())) return false; if (hasCustomerManagedEncryptionKey() != other.hasCustomerManagedEncryptionKey()) return false; if (hasCustomerManagedEncryptionKey()) { if (!getCustomerManagedEncryptionKey().equals(other.getCustomerManagedEncryptionKey())) return false; } if (!getBackfillStrategyCase().equals(other.getBackfillStrategyCase())) return false; switch (backfillStrategyCase_) { case 101: if (!getBackfillAll().equals(other.getBackfillAll())) return false; break; case 102: if (!getBackfillNone().equals(other.getBackfillNone())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } if (hasUpdateTime()) { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); if (hasSourceConfig()) { hash = (37 * hash) + SOURCE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getSourceConfig().hashCode(); } if (hasDestinationConfig()) { hash = (37 * hash) + DESTINATION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getDestinationConfig().hashCode(); } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (getErrorsCount() > 0) { hash = (37 * hash) + ERRORS_FIELD_NUMBER; hash = (53 * hash) + getErrorsList().hashCode(); } if (hasCustomerManagedEncryptionKey()) { hash = (37 * hash) + CUSTOMER_MANAGED_ENCRYPTION_KEY_FIELD_NUMBER; hash = (53 * hash) + getCustomerManagedEncryptionKey().hashCode(); } switch (backfillStrategyCase_) { case 101: hash = (37 * hash) + BACKFILL_ALL_FIELD_NUMBER; hash = (53 * hash) + getBackfillAll().hashCode(); break; case 102: hash = (37 * hash) + BACKFILL_NONE_FIELD_NUMBER; hash = (53 * hash) + getBackfillNone().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.datastream.v1.Stream parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream 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.Stream parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream 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.Stream parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.Stream 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.Stream parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream 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.Stream parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.Stream 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.Stream 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.Stream 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.Stream 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; } /** * * *
   * A resource representing streaming data from a source to a destination.
   * 
* * Protobuf type {@code google.cloud.datastream.v1.Stream} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.Stream) com.google.cloud.datastream.v1.StreamOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 4: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 4: return internalGetMutableLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_Stream_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.Stream.class, com.google.cloud.datastream.v1.Stream.Builder.class); } // Construct using com.google.cloud.datastream.v1.Stream.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getErrorsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; if (createTimeBuilder_ == null) { createTime_ = null; } else { createTime_ = null; createTimeBuilder_ = null; } if (updateTimeBuilder_ == null) { updateTime_ = null; } else { updateTime_ = null; updateTimeBuilder_ = null; } internalGetMutableLabels().clear(); displayName_ = ""; if (sourceConfigBuilder_ == null) { sourceConfig_ = null; } else { sourceConfig_ = null; sourceConfigBuilder_ = null; } if (destinationConfigBuilder_ == null) { destinationConfig_ = null; } else { destinationConfig_ = null; destinationConfigBuilder_ = null; } state_ = 0; if (errorsBuilder_ == null) { errors_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { errorsBuilder_.clear(); } customerManagedEncryptionKey_ = ""; bitField0_ = (bitField0_ & ~0x00000004); backfillStrategyCase_ = 0; backfillStrategy_ = 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_Stream_descriptor; } @java.lang.Override public com.google.cloud.datastream.v1.Stream getDefaultInstanceForType() { return com.google.cloud.datastream.v1.Stream.getDefaultInstance(); } @java.lang.Override public com.google.cloud.datastream.v1.Stream build() { com.google.cloud.datastream.v1.Stream result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.datastream.v1.Stream buildPartial() { com.google.cloud.datastream.v1.Stream result = new com.google.cloud.datastream.v1.Stream(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { result.createTime_ = createTimeBuilder_.build(); } if (updateTimeBuilder_ == null) { result.updateTime_ = updateTime_; } else { result.updateTime_ = updateTimeBuilder_.build(); } result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); result.displayName_ = displayName_; if (sourceConfigBuilder_ == null) { result.sourceConfig_ = sourceConfig_; } else { result.sourceConfig_ = sourceConfigBuilder_.build(); } if (destinationConfigBuilder_ == null) { result.destinationConfig_ = destinationConfig_; } else { result.destinationConfig_ = destinationConfigBuilder_.build(); } result.state_ = state_; if (backfillStrategyCase_ == 101) { if (backfillAllBuilder_ == null) { result.backfillStrategy_ = backfillStrategy_; } else { result.backfillStrategy_ = backfillAllBuilder_.build(); } } if (backfillStrategyCase_ == 102) { if (backfillNoneBuilder_ == null) { result.backfillStrategy_ = backfillStrategy_; } else { result.backfillStrategy_ = backfillNoneBuilder_.build(); } } if (errorsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { errors_ = java.util.Collections.unmodifiableList(errors_); bitField0_ = (bitField0_ & ~0x00000002); } result.errors_ = errors_; } else { result.errors_ = errorsBuilder_.build(); } if (((from_bitField0_ & 0x00000004) != 0)) { to_bitField0_ |= 0x00000001; } result.customerManagedEncryptionKey_ = customerManagedEncryptionKey_; result.bitField0_ = to_bitField0_; result.backfillStrategyCase_ = backfillStrategyCase_; 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.Stream) { return mergeFrom((com.google.cloud.datastream.v1.Stream) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.datastream.v1.Stream other) { if (other == com.google.cloud.datastream.v1.Stream.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (other.hasSourceConfig()) { mergeSourceConfig(other.getSourceConfig()); } if (other.hasDestinationConfig()) { mergeDestinationConfig(other.getDestinationConfig()); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (errorsBuilder_ == null) { if (!other.errors_.isEmpty()) { if (errors_.isEmpty()) { errors_ = other.errors_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureErrorsIsMutable(); errors_.addAll(other.errors_); } onChanged(); } } else { if (!other.errors_.isEmpty()) { if (errorsBuilder_.isEmpty()) { errorsBuilder_.dispose(); errorsBuilder_ = null; errors_ = other.errors_; bitField0_ = (bitField0_ & ~0x00000002); errorsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getErrorsFieldBuilder() : null; } else { errorsBuilder_.addAllMessages(other.errors_); } } } if (other.hasCustomerManagedEncryptionKey()) { bitField0_ |= 0x00000004; customerManagedEncryptionKey_ = other.customerManagedEncryptionKey_; onChanged(); } switch (other.getBackfillStrategyCase()) { case BACKFILL_ALL: { mergeBackfillAll(other.getBackfillAll()); break; } case BACKFILL_NONE: { mergeBackfillNone(other.getBackfillNone()); break; } case BACKFILLSTRATEGY_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.Stream parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.datastream.v1.Stream) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int backfillStrategyCase_ = 0; private java.lang.Object backfillStrategy_; public BackfillStrategyCase getBackfillStrategyCase() { return BackfillStrategyCase.forNumber(backfillStrategyCase_); } public Builder clearBackfillStrategy() { backfillStrategyCase_ = 0; backfillStrategy_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * Output only. The stream's name.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The stream's name.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The stream's name.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * * *
     * Output only. The stream's name.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * * *
     * Output only. The stream's name.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; onChanged(); } else { createTimeBuilder_.setMessage(value); } return this; } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } onChanged(); } else { createTimeBuilder_.mergeFrom(value); } return this; } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { createTime_ = null; onChanged(); } else { createTime_ = null; createTimeBuilder_ = null; } return this; } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * Output only. The creation time of the stream.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { return updateTimeBuilder_ != null || updateTime_ != null; } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } else { return updateTimeBuilder_.getMessage(); } } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateTime_ = value; onChanged(); } else { updateTimeBuilder_.setMessage(value); } return this; } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { updateTime_ = builderForValue.build(); onChanged(); } else { updateTimeBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (updateTime_ != null) { updateTime_ = com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); } else { updateTime_ = value; } onChanged(); } else { updateTimeBuilder_.mergeFrom(value); } return this; } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearUpdateTime() { if (updateTimeBuilder_ == null) { updateTime_ = null; onChanged(); } else { updateTime_ = null; updateTimeBuilder_ = null; } return this; } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { return updateTimeBuilder_.getMessageOrBuilder(); } else { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } } /** * * *
     * Output only. The last update time of the stream.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdateTime(), getParentForChildren(), isClean()); updateTime_ = null; } return updateTimeBuilder_; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { onChanged(); ; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap().put(key, value); return this; } /** * * *
     * Labels.
     * 
* * map<string, string> labels = 4; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * Required. Display name.
     * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. Display name.
     * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. Display name.
     * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** * * *
     * Required. Display name.
     * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** * * *
     * Required. Display name.
     * 
* * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } private com.google.cloud.datastream.v1.SourceConfig sourceConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.SourceConfig, com.google.cloud.datastream.v1.SourceConfig.Builder, com.google.cloud.datastream.v1.SourceConfigOrBuilder> sourceConfigBuilder_; /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the sourceConfig field is set. */ public boolean hasSourceConfig() { return sourceConfigBuilder_ != null || sourceConfig_ != null; } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return The sourceConfig. */ public com.google.cloud.datastream.v1.SourceConfig getSourceConfig() { if (sourceConfigBuilder_ == null) { return sourceConfig_ == null ? com.google.cloud.datastream.v1.SourceConfig.getDefaultInstance() : sourceConfig_; } else { return sourceConfigBuilder_.getMessage(); } } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setSourceConfig(com.google.cloud.datastream.v1.SourceConfig value) { if (sourceConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sourceConfig_ = value; onChanged(); } else { sourceConfigBuilder_.setMessage(value); } return this; } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setSourceConfig( com.google.cloud.datastream.v1.SourceConfig.Builder builderForValue) { if (sourceConfigBuilder_ == null) { sourceConfig_ = builderForValue.build(); onChanged(); } else { sourceConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeSourceConfig(com.google.cloud.datastream.v1.SourceConfig value) { if (sourceConfigBuilder_ == null) { if (sourceConfig_ != null) { sourceConfig_ = com.google.cloud.datastream.v1.SourceConfig.newBuilder(sourceConfig_) .mergeFrom(value) .buildPartial(); } else { sourceConfig_ = value; } onChanged(); } else { sourceConfigBuilder_.mergeFrom(value); } return this; } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearSourceConfig() { if (sourceConfigBuilder_ == null) { sourceConfig_ = null; onChanged(); } else { sourceConfig_ = null; sourceConfigBuilder_ = null; } return this; } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.datastream.v1.SourceConfig.Builder getSourceConfigBuilder() { onChanged(); return getSourceConfigFieldBuilder().getBuilder(); } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.datastream.v1.SourceConfigOrBuilder getSourceConfigOrBuilder() { if (sourceConfigBuilder_ != null) { return sourceConfigBuilder_.getMessageOrBuilder(); } else { return sourceConfig_ == null ? com.google.cloud.datastream.v1.SourceConfig.getDefaultInstance() : sourceConfig_; } } /** * * *
     * Required. Source connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.SourceConfig, com.google.cloud.datastream.v1.SourceConfig.Builder, com.google.cloud.datastream.v1.SourceConfigOrBuilder> getSourceConfigFieldBuilder() { if (sourceConfigBuilder_ == null) { sourceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.SourceConfig, com.google.cloud.datastream.v1.SourceConfig.Builder, com.google.cloud.datastream.v1.SourceConfigOrBuilder>( getSourceConfig(), getParentForChildren(), isClean()); sourceConfig_ = null; } return sourceConfigBuilder_; } private com.google.cloud.datastream.v1.DestinationConfig destinationConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.DestinationConfig, com.google.cloud.datastream.v1.DestinationConfig.Builder, com.google.cloud.datastream.v1.DestinationConfigOrBuilder> destinationConfigBuilder_; /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the destinationConfig field is set. */ public boolean hasDestinationConfig() { return destinationConfigBuilder_ != null || destinationConfig_ != null; } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * * * @return The destinationConfig. */ public com.google.cloud.datastream.v1.DestinationConfig getDestinationConfig() { if (destinationConfigBuilder_ == null) { return destinationConfig_ == null ? com.google.cloud.datastream.v1.DestinationConfig.getDefaultInstance() : destinationConfig_; } else { return destinationConfigBuilder_.getMessage(); } } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDestinationConfig(com.google.cloud.datastream.v1.DestinationConfig value) { if (destinationConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } destinationConfig_ = value; onChanged(); } else { destinationConfigBuilder_.setMessage(value); } return this; } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDestinationConfig( com.google.cloud.datastream.v1.DestinationConfig.Builder builderForValue) { if (destinationConfigBuilder_ == null) { destinationConfig_ = builderForValue.build(); onChanged(); } else { destinationConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeDestinationConfig(com.google.cloud.datastream.v1.DestinationConfig value) { if (destinationConfigBuilder_ == null) { if (destinationConfig_ != null) { destinationConfig_ = com.google.cloud.datastream.v1.DestinationConfig.newBuilder(destinationConfig_) .mergeFrom(value) .buildPartial(); } else { destinationConfig_ = value; } onChanged(); } else { destinationConfigBuilder_.mergeFrom(value); } return this; } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearDestinationConfig() { if (destinationConfigBuilder_ == null) { destinationConfig_ = null; onChanged(); } else { destinationConfig_ = null; destinationConfigBuilder_ = null; } return this; } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.datastream.v1.DestinationConfig.Builder getDestinationConfigBuilder() { onChanged(); return getDestinationConfigFieldBuilder().getBuilder(); } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.datastream.v1.DestinationConfigOrBuilder getDestinationConfigOrBuilder() { if (destinationConfigBuilder_ != null) { return destinationConfigBuilder_.getMessageOrBuilder(); } else { return destinationConfig_ == null ? com.google.cloud.datastream.v1.DestinationConfig.getDefaultInstance() : destinationConfig_; } } /** * * *
     * Required. Destination connection profile configuration.
     * 
* * * .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.DestinationConfig, com.google.cloud.datastream.v1.DestinationConfig.Builder, com.google.cloud.datastream.v1.DestinationConfigOrBuilder> getDestinationConfigFieldBuilder() { if (destinationConfigBuilder_ == null) { destinationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.DestinationConfig, com.google.cloud.datastream.v1.DestinationConfig.Builder, com.google.cloud.datastream.v1.DestinationConfigOrBuilder>( getDestinationConfig(), getParentForChildren(), isClean()); destinationConfig_ = null; } return destinationConfigBuilder_; } private int state_ = 0; /** * * *
     * The state of the stream.
     * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
     * The state of the stream.
     * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @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; onChanged(); return this; } /** * * *
     * The state of the stream.
     * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @return The state. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.State getState() { @SuppressWarnings("deprecation") com.google.cloud.datastream.v1.Stream.State result = com.google.cloud.datastream.v1.Stream.State.valueOf(state_); return result == null ? com.google.cloud.datastream.v1.Stream.State.UNRECOGNIZED : result; } /** * * *
     * The state of the stream.
     * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @param value The state to set. * @return This builder for chaining. */ public Builder setState(com.google.cloud.datastream.v1.Stream.State value) { if (value == null) { throw new NullPointerException(); } state_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The state of the stream.
     * 
* * .google.cloud.datastream.v1.Stream.State state = 8; * * @return This builder for chaining. */ public Builder clearState() { state_ = 0; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillAllStrategy, com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder> backfillAllBuilder_; /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; * * @return Whether the backfillAll field is set. */ @java.lang.Override public boolean hasBackfillAll() { return backfillStrategyCase_ == 101; } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; * * @return The backfillAll. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy getBackfillAll() { if (backfillAllBuilder_ == null) { if (backfillStrategyCase_ == 101) { return (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } else { if (backfillStrategyCase_ == 101) { return backfillAllBuilder_.getMessage(); } return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ public Builder setBackfillAll(com.google.cloud.datastream.v1.Stream.BackfillAllStrategy value) { if (backfillAllBuilder_ == null) { if (value == null) { throw new NullPointerException(); } backfillStrategy_ = value; onChanged(); } else { backfillAllBuilder_.setMessage(value); } backfillStrategyCase_ = 101; return this; } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ public Builder setBackfillAll( com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder builderForValue) { if (backfillAllBuilder_ == null) { backfillStrategy_ = builderForValue.build(); onChanged(); } else { backfillAllBuilder_.setMessage(builderForValue.build()); } backfillStrategyCase_ = 101; return this; } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ public Builder mergeBackfillAll( com.google.cloud.datastream.v1.Stream.BackfillAllStrategy value) { if (backfillAllBuilder_ == null) { if (backfillStrategyCase_ == 101 && backfillStrategy_ != com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance()) { backfillStrategy_ = com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.newBuilder( (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_) .mergeFrom(value) .buildPartial(); } else { backfillStrategy_ = value; } onChanged(); } else { if (backfillStrategyCase_ == 101) { backfillAllBuilder_.mergeFrom(value); } backfillAllBuilder_.setMessage(value); } backfillStrategyCase_ = 101; return this; } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ public Builder clearBackfillAll() { if (backfillAllBuilder_ == null) { if (backfillStrategyCase_ == 101) { backfillStrategyCase_ = 0; backfillStrategy_ = null; onChanged(); } } else { if (backfillStrategyCase_ == 101) { backfillStrategyCase_ = 0; backfillStrategy_ = null; } backfillAllBuilder_.clear(); } return this; } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ public com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder getBackfillAllBuilder() { return getBackfillAllFieldBuilder().getBuilder(); } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder getBackfillAllOrBuilder() { if ((backfillStrategyCase_ == 101) && (backfillAllBuilder_ != null)) { return backfillAllBuilder_.getMessageOrBuilder(); } else { if (backfillStrategyCase_ == 101) { return (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } } /** * * *
     * Automatically backfill objects included in the stream source
     * configuration. Specific objects can be excluded.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillAllStrategy, com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder> getBackfillAllFieldBuilder() { if (backfillAllBuilder_ == null) { if (!(backfillStrategyCase_ == 101)) { backfillStrategy_ = com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.getDefaultInstance(); } backfillAllBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillAllStrategy, com.google.cloud.datastream.v1.Stream.BackfillAllStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder>( (com.google.cloud.datastream.v1.Stream.BackfillAllStrategy) backfillStrategy_, getParentForChildren(), isClean()); backfillStrategy_ = null; } backfillStrategyCase_ = 101; onChanged(); ; return backfillAllBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder> backfillNoneBuilder_; /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; * * @return Whether the backfillNone field is set. */ @java.lang.Override public boolean hasBackfillNone() { return backfillStrategyCase_ == 102; } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; * * @return The backfillNone. */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy getBackfillNone() { if (backfillNoneBuilder_ == null) { if (backfillStrategyCase_ == 102) { return (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } else { if (backfillStrategyCase_ == 102) { return backfillNoneBuilder_.getMessage(); } return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ public Builder setBackfillNone( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy value) { if (backfillNoneBuilder_ == null) { if (value == null) { throw new NullPointerException(); } backfillStrategy_ = value; onChanged(); } else { backfillNoneBuilder_.setMessage(value); } backfillStrategyCase_ = 102; return this; } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ public Builder setBackfillNone( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder builderForValue) { if (backfillNoneBuilder_ == null) { backfillStrategy_ = builderForValue.build(); onChanged(); } else { backfillNoneBuilder_.setMessage(builderForValue.build()); } backfillStrategyCase_ = 102; return this; } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ public Builder mergeBackfillNone( com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy value) { if (backfillNoneBuilder_ == null) { if (backfillStrategyCase_ == 102 && backfillStrategy_ != com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy .getDefaultInstance()) { backfillStrategy_ = com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.newBuilder( (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_) .mergeFrom(value) .buildPartial(); } else { backfillStrategy_ = value; } onChanged(); } else { if (backfillStrategyCase_ == 102) { backfillNoneBuilder_.mergeFrom(value); } backfillNoneBuilder_.setMessage(value); } backfillStrategyCase_ = 102; return this; } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ public Builder clearBackfillNone() { if (backfillNoneBuilder_ == null) { if (backfillStrategyCase_ == 102) { backfillStrategyCase_ = 0; backfillStrategy_ = null; onChanged(); } } else { if (backfillStrategyCase_ == 102) { backfillStrategyCase_ = 0; backfillStrategy_ = null; } backfillNoneBuilder_.clear(); } return this; } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder getBackfillNoneBuilder() { return getBackfillNoneFieldBuilder().getBuilder(); } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ @java.lang.Override public com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder getBackfillNoneOrBuilder() { if ((backfillStrategyCase_ == 102) && (backfillNoneBuilder_ != null)) { return backfillNoneBuilder_.getMessageOrBuilder(); } else { if (backfillStrategyCase_ == 102) { return (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_; } return com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } } /** * * *
     * Do not automatically backfill any objects.
     * 
* * .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder> getBackfillNoneFieldBuilder() { if (backfillNoneBuilder_ == null) { if (!(backfillStrategyCase_ == 102)) { backfillStrategy_ = com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.getDefaultInstance(); } backfillNoneBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.Builder, com.google.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder>( (com.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) backfillStrategy_, getParentForChildren(), isClean()); backfillStrategy_ = null; } backfillStrategyCase_ = 102; onChanged(); ; return backfillNoneBuilder_; } private java.util.List errors_ = java.util.Collections.emptyList(); private void ensureErrorsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { errors_ = new java.util.ArrayList(errors_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.datastream.v1.Error, com.google.cloud.datastream.v1.Error.Builder, com.google.cloud.datastream.v1.ErrorOrBuilder> errorsBuilder_; /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getErrorsList() { if (errorsBuilder_ == null) { return java.util.Collections.unmodifiableList(errors_); } else { return errorsBuilder_.getMessageList(); } } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public int getErrorsCount() { if (errorsBuilder_ == null) { return errors_.size(); } else { return errorsBuilder_.getCount(); } } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.datastream.v1.Error getErrors(int index) { if (errorsBuilder_ == null) { return errors_.get(index); } else { return errorsBuilder_.getMessage(index); } } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setErrors(int index, com.google.cloud.datastream.v1.Error value) { if (errorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.set(index, value); onChanged(); } else { errorsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setErrors( int index, com.google.cloud.datastream.v1.Error.Builder builderForValue) { if (errorsBuilder_ == null) { ensureErrorsIsMutable(); errors_.set(index, builderForValue.build()); onChanged(); } else { errorsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addErrors(com.google.cloud.datastream.v1.Error value) { if (errorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.add(value); onChanged(); } else { errorsBuilder_.addMessage(value); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addErrors(int index, com.google.cloud.datastream.v1.Error value) { if (errorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.add(index, value); onChanged(); } else { errorsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addErrors(com.google.cloud.datastream.v1.Error.Builder builderForValue) { if (errorsBuilder_ == null) { ensureErrorsIsMutable(); errors_.add(builderForValue.build()); onChanged(); } else { errorsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addErrors( int index, com.google.cloud.datastream.v1.Error.Builder builderForValue) { if (errorsBuilder_ == null) { ensureErrorsIsMutable(); errors_.add(index, builderForValue.build()); onChanged(); } else { errorsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAllErrors( java.lang.Iterable values) { if (errorsBuilder_ == null) { ensureErrorsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); onChanged(); } else { errorsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearErrors() { if (errorsBuilder_ == null) { errors_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { errorsBuilder_.clear(); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeErrors(int index) { if (errorsBuilder_ == null) { ensureErrorsIsMutable(); errors_.remove(index); onChanged(); } else { errorsBuilder_.remove(index); } return this; } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.datastream.v1.Error.Builder getErrorsBuilder(int index) { return getErrorsFieldBuilder().getBuilder(index); } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.datastream.v1.ErrorOrBuilder getErrorsOrBuilder(int index) { if (errorsBuilder_ == null) { return errors_.get(index); } else { return errorsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getErrorsOrBuilderList() { if (errorsBuilder_ != null) { return errorsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(errors_); } } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.datastream.v1.Error.Builder addErrorsBuilder() { return getErrorsFieldBuilder() .addBuilder(com.google.cloud.datastream.v1.Error.getDefaultInstance()); } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.datastream.v1.Error.Builder addErrorsBuilder(int index) { return getErrorsFieldBuilder() .addBuilder(index, com.google.cloud.datastream.v1.Error.getDefaultInstance()); } /** * * *
     * Output only. Errors on the Stream.
     * 
* * * repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getErrorsBuilderList() { return getErrorsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.datastream.v1.Error, com.google.cloud.datastream.v1.Error.Builder, com.google.cloud.datastream.v1.ErrorOrBuilder> getErrorsFieldBuilder() { if (errorsBuilder_ == null) { errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.datastream.v1.Error, com.google.cloud.datastream.v1.Error.Builder, com.google.cloud.datastream.v1.ErrorOrBuilder>( errors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); errors_ = null; } return errorsBuilder_; } private java.lang.Object customerManagedEncryptionKey_ = ""; /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return Whether the customerManagedEncryptionKey field is set. */ public boolean hasCustomerManagedEncryptionKey() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The customerManagedEncryptionKey. */ public java.lang.String getCustomerManagedEncryptionKey() { java.lang.Object ref = customerManagedEncryptionKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); customerManagedEncryptionKey_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The bytes for customerManagedEncryptionKey. */ public com.google.protobuf.ByteString getCustomerManagedEncryptionKeyBytes() { java.lang.Object ref = customerManagedEncryptionKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); customerManagedEncryptionKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The customerManagedEncryptionKey to set. * @return This builder for chaining. */ public Builder setCustomerManagedEncryptionKey(java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; customerManagedEncryptionKey_ = value; onChanged(); return this; } /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return This builder for chaining. */ public Builder clearCustomerManagedEncryptionKey() { bitField0_ = (bitField0_ & ~0x00000004); customerManagedEncryptionKey_ = getDefaultInstance().getCustomerManagedEncryptionKey(); onChanged(); return this; } /** * * *
     * Immutable. A reference to a KMS encryption key.
     * If provided, it will be used to encrypt the data.
     * If left blank, data will be encrypted using an internal Stream-specific
     * encryption key provisioned through KMS.
     * 
* * * optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The bytes for customerManagedEncryptionKey to set. * @return This builder for chaining. */ public Builder setCustomerManagedEncryptionKeyBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); bitField0_ |= 0x00000004; customerManagedEncryptionKey_ = value; 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.cloud.datastream.v1.Stream) } // @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.Stream) private static final com.google.cloud.datastream.v1.Stream DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.Stream(); } public static com.google.cloud.datastream.v1.Stream getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Stream parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Stream(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.Stream getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy