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

com.google.cloud.datastream.v1.MysqlColumn 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;

/**
 *
 *
 * 
 * MySQL Column.
 * 
* * Protobuf type {@code google.cloud.datastream.v1.MysqlColumn} */ public final class MysqlColumn extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.MysqlColumn) MysqlColumnOrBuilder { private static final long serialVersionUID = 0L; // Use MysqlColumn.newBuilder() to construct. private MysqlColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MysqlColumn() { column_ = ""; dataType_ = ""; collation_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new MysqlColumn(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MysqlColumn( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); column_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); dataType_ = s; break; } case 24: { length_ = input.readInt32(); break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); collation_ = s; break; } case 40: { primaryKey_ = input.readBool(); break; } case 48: { nullable_ = input.readBool(); break; } case 56: { ordinalPosition_ = input.readInt32(); 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_MysqlColumn_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_MysqlColumn_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.MysqlColumn.class, com.google.cloud.datastream.v1.MysqlColumn.Builder.class); } public static final int COLUMN_FIELD_NUMBER = 1; private volatile java.lang.Object column_; /** * * *
   * Column name.
   * 
* * string column = 1; * * @return The column. */ @java.lang.Override public java.lang.String getColumn() { java.lang.Object ref = column_; 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(); column_ = s; return s; } } /** * * *
   * Column name.
   * 
* * string column = 1; * * @return The bytes for column. */ @java.lang.Override public com.google.protobuf.ByteString getColumnBytes() { java.lang.Object ref = column_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); column_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DATA_TYPE_FIELD_NUMBER = 2; private volatile java.lang.Object dataType_; /** * * *
   * The MySQL data type. Full data types list can be found here:
   * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
   * 
* * string data_type = 2; * * @return The dataType. */ @java.lang.Override public java.lang.String getDataType() { java.lang.Object ref = dataType_; 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(); dataType_ = s; return s; } } /** * * *
   * The MySQL data type. Full data types list can be found here:
   * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
   * 
* * string data_type = 2; * * @return The bytes for dataType. */ @java.lang.Override public com.google.protobuf.ByteString getDataTypeBytes() { java.lang.Object ref = dataType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); dataType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LENGTH_FIELD_NUMBER = 3; private int length_; /** * * *
   * Column length.
   * 
* * int32 length = 3; * * @return The length. */ @java.lang.Override public int getLength() { return length_; } public static final int COLLATION_FIELD_NUMBER = 4; private volatile java.lang.Object collation_; /** * * *
   * Column collation.
   * 
* * string collation = 4; * * @return The collation. */ @java.lang.Override public java.lang.String getCollation() { java.lang.Object ref = collation_; 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(); collation_ = s; return s; } } /** * * *
   * Column collation.
   * 
* * string collation = 4; * * @return The bytes for collation. */ @java.lang.Override public com.google.protobuf.ByteString getCollationBytes() { java.lang.Object ref = collation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); collation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PRIMARY_KEY_FIELD_NUMBER = 5; private boolean primaryKey_; /** * * *
   * Whether or not the column represents a primary key.
   * 
* * bool primary_key = 5; * * @return The primaryKey. */ @java.lang.Override public boolean getPrimaryKey() { return primaryKey_; } public static final int NULLABLE_FIELD_NUMBER = 6; private boolean nullable_; /** * * *
   * Whether or not the column can accept a null value.
   * 
* * bool nullable = 6; * * @return The nullable. */ @java.lang.Override public boolean getNullable() { return nullable_; } public static final int ORDINAL_POSITION_FIELD_NUMBER = 7; private int ordinalPosition_; /** * * *
   * The ordinal position of the column in the table.
   * 
* * int32 ordinal_position = 7; * * @return The ordinalPosition. */ @java.lang.Override public int getOrdinalPosition() { return ordinalPosition_; } 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(column_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, column_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataType_); } if (length_ != 0) { output.writeInt32(3, length_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, collation_); } if (primaryKey_ != false) { output.writeBool(5, primaryKey_); } if (nullable_ != false) { output.writeBool(6, nullable_); } if (ordinalPosition_ != 0) { output.writeInt32(7, ordinalPosition_); } 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(column_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, column_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataType_); } if (length_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, length_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, collation_); } if (primaryKey_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, primaryKey_); } if (nullable_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, nullable_); } if (ordinalPosition_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, ordinalPosition_); } 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.MysqlColumn)) { return super.equals(obj); } com.google.cloud.datastream.v1.MysqlColumn other = (com.google.cloud.datastream.v1.MysqlColumn) obj; if (!getColumn().equals(other.getColumn())) return false; if (!getDataType().equals(other.getDataType())) return false; if (getLength() != other.getLength()) return false; if (!getCollation().equals(other.getCollation())) return false; if (getPrimaryKey() != other.getPrimaryKey()) return false; if (getNullable() != other.getNullable()) return false; if (getOrdinalPosition() != other.getOrdinalPosition()) return false; 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) + COLUMN_FIELD_NUMBER; hash = (53 * hash) + getColumn().hashCode(); hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; hash = (53 * hash) + getDataType().hashCode(); hash = (37 * hash) + LENGTH_FIELD_NUMBER; hash = (53 * hash) + getLength(); hash = (37 * hash) + COLLATION_FIELD_NUMBER; hash = (53 * hash) + getCollation().hashCode(); hash = (37 * hash) + PRIMARY_KEY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrimaryKey()); hash = (37 * hash) + NULLABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullable()); hash = (37 * hash) + ORDINAL_POSITION_FIELD_NUMBER; hash = (53 * hash) + getOrdinalPosition(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.datastream.v1.MysqlColumn parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.MysqlColumn 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.MysqlColumn parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.MysqlColumn 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.MysqlColumn parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.datastream.v1.MysqlColumn 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.MysqlColumn parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.MysqlColumn 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.MysqlColumn parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.datastream.v1.MysqlColumn 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.MysqlColumn 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.MysqlColumn 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.MysqlColumn 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; } /** * * *
   * MySQL Column.
   * 
* * Protobuf type {@code google.cloud.datastream.v1.MysqlColumn} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.MysqlColumn) com.google.cloud.datastream.v1.MysqlColumnOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_MysqlColumn_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.datastream.v1.DatastreamResourcesProto .internal_static_google_cloud_datastream_v1_MysqlColumn_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.datastream.v1.MysqlColumn.class, com.google.cloud.datastream.v1.MysqlColumn.Builder.class); } // Construct using com.google.cloud.datastream.v1.MysqlColumn.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(); column_ = ""; dataType_ = ""; length_ = 0; collation_ = ""; primaryKey_ = false; nullable_ = false; ordinalPosition_ = 0; 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_MysqlColumn_descriptor; } @java.lang.Override public com.google.cloud.datastream.v1.MysqlColumn getDefaultInstanceForType() { return com.google.cloud.datastream.v1.MysqlColumn.getDefaultInstance(); } @java.lang.Override public com.google.cloud.datastream.v1.MysqlColumn build() { com.google.cloud.datastream.v1.MysqlColumn result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.datastream.v1.MysqlColumn buildPartial() { com.google.cloud.datastream.v1.MysqlColumn result = new com.google.cloud.datastream.v1.MysqlColumn(this); result.column_ = column_; result.dataType_ = dataType_; result.length_ = length_; result.collation_ = collation_; result.primaryKey_ = primaryKey_; result.nullable_ = nullable_; result.ordinalPosition_ = ordinalPosition_; 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.MysqlColumn) { return mergeFrom((com.google.cloud.datastream.v1.MysqlColumn) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.datastream.v1.MysqlColumn other) { if (other == com.google.cloud.datastream.v1.MysqlColumn.getDefaultInstance()) return this; if (!other.getColumn().isEmpty()) { column_ = other.column_; onChanged(); } if (!other.getDataType().isEmpty()) { dataType_ = other.dataType_; onChanged(); } if (other.getLength() != 0) { setLength(other.getLength()); } if (!other.getCollation().isEmpty()) { collation_ = other.collation_; onChanged(); } if (other.getPrimaryKey() != false) { setPrimaryKey(other.getPrimaryKey()); } if (other.getNullable() != false) { setNullable(other.getNullable()); } if (other.getOrdinalPosition() != 0) { setOrdinalPosition(other.getOrdinalPosition()); } 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.MysqlColumn parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.datastream.v1.MysqlColumn) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object column_ = ""; /** * * *
     * Column name.
     * 
* * string column = 1; * * @return The column. */ public java.lang.String getColumn() { java.lang.Object ref = column_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); column_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Column name.
     * 
* * string column = 1; * * @return The bytes for column. */ public com.google.protobuf.ByteString getColumnBytes() { java.lang.Object ref = column_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); column_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Column name.
     * 
* * string column = 1; * * @param value The column to set. * @return This builder for chaining. */ public Builder setColumn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } column_ = value; onChanged(); return this; } /** * * *
     * Column name.
     * 
* * string column = 1; * * @return This builder for chaining. */ public Builder clearColumn() { column_ = getDefaultInstance().getColumn(); onChanged(); return this; } /** * * *
     * Column name.
     * 
* * string column = 1; * * @param value The bytes for column to set. * @return This builder for chaining. */ public Builder setColumnBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); column_ = value; onChanged(); return this; } private java.lang.Object dataType_ = ""; /** * * *
     * The MySQL data type. Full data types list can be found here:
     * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
     * 
* * string data_type = 2; * * @return The dataType. */ public java.lang.String getDataType() { java.lang.Object ref = dataType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); dataType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The MySQL data type. Full data types list can be found here:
     * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
     * 
* * string data_type = 2; * * @return The bytes for dataType. */ public com.google.protobuf.ByteString getDataTypeBytes() { java.lang.Object ref = dataType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); dataType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The MySQL data type. Full data types list can be found here:
     * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
     * 
* * string data_type = 2; * * @param value The dataType to set. * @return This builder for chaining. */ public Builder setDataType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } dataType_ = value; onChanged(); return this; } /** * * *
     * The MySQL data type. Full data types list can be found here:
     * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
     * 
* * string data_type = 2; * * @return This builder for chaining. */ public Builder clearDataType() { dataType_ = getDefaultInstance().getDataType(); onChanged(); return this; } /** * * *
     * The MySQL data type. Full data types list can be found here:
     * https://dev.mysql.com/doc/refman/8.0/en/data-types.html
     * 
* * string data_type = 2; * * @param value The bytes for dataType to set. * @return This builder for chaining. */ public Builder setDataTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); dataType_ = value; onChanged(); return this; } private int length_; /** * * *
     * Column length.
     * 
* * int32 length = 3; * * @return The length. */ @java.lang.Override public int getLength() { return length_; } /** * * *
     * Column length.
     * 
* * int32 length = 3; * * @param value The length to set. * @return This builder for chaining. */ public Builder setLength(int value) { length_ = value; onChanged(); return this; } /** * * *
     * Column length.
     * 
* * int32 length = 3; * * @return This builder for chaining. */ public Builder clearLength() { length_ = 0; onChanged(); return this; } private java.lang.Object collation_ = ""; /** * * *
     * Column collation.
     * 
* * string collation = 4; * * @return The collation. */ public java.lang.String getCollation() { java.lang.Object ref = collation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collation_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Column collation.
     * 
* * string collation = 4; * * @return The bytes for collation. */ public com.google.protobuf.ByteString getCollationBytes() { java.lang.Object ref = collation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); collation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Column collation.
     * 
* * string collation = 4; * * @param value The collation to set. * @return This builder for chaining. */ public Builder setCollation(java.lang.String value) { if (value == null) { throw new NullPointerException(); } collation_ = value; onChanged(); return this; } /** * * *
     * Column collation.
     * 
* * string collation = 4; * * @return This builder for chaining. */ public Builder clearCollation() { collation_ = getDefaultInstance().getCollation(); onChanged(); return this; } /** * * *
     * Column collation.
     * 
* * string collation = 4; * * @param value The bytes for collation to set. * @return This builder for chaining. */ public Builder setCollationBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collation_ = value; onChanged(); return this; } private boolean primaryKey_; /** * * *
     * Whether or not the column represents a primary key.
     * 
* * bool primary_key = 5; * * @return The primaryKey. */ @java.lang.Override public boolean getPrimaryKey() { return primaryKey_; } /** * * *
     * Whether or not the column represents a primary key.
     * 
* * bool primary_key = 5; * * @param value The primaryKey to set. * @return This builder for chaining. */ public Builder setPrimaryKey(boolean value) { primaryKey_ = value; onChanged(); return this; } /** * * *
     * Whether or not the column represents a primary key.
     * 
* * bool primary_key = 5; * * @return This builder for chaining. */ public Builder clearPrimaryKey() { primaryKey_ = false; onChanged(); return this; } private boolean nullable_; /** * * *
     * Whether or not the column can accept a null value.
     * 
* * bool nullable = 6; * * @return The nullable. */ @java.lang.Override public boolean getNullable() { return nullable_; } /** * * *
     * Whether or not the column can accept a null value.
     * 
* * bool nullable = 6; * * @param value The nullable to set. * @return This builder for chaining. */ public Builder setNullable(boolean value) { nullable_ = value; onChanged(); return this; } /** * * *
     * Whether or not the column can accept a null value.
     * 
* * bool nullable = 6; * * @return This builder for chaining. */ public Builder clearNullable() { nullable_ = false; onChanged(); return this; } private int ordinalPosition_; /** * * *
     * The ordinal position of the column in the table.
     * 
* * int32 ordinal_position = 7; * * @return The ordinalPosition. */ @java.lang.Override public int getOrdinalPosition() { return ordinalPosition_; } /** * * *
     * The ordinal position of the column in the table.
     * 
* * int32 ordinal_position = 7; * * @param value The ordinalPosition to set. * @return This builder for chaining. */ public Builder setOrdinalPosition(int value) { ordinalPosition_ = value; onChanged(); return this; } /** * * *
     * The ordinal position of the column in the table.
     * 
* * int32 ordinal_position = 7; * * @return This builder for chaining. */ public Builder clearOrdinalPosition() { ordinalPosition_ = 0; 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.MysqlColumn) } // @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.MysqlColumn) private static final com.google.cloud.datastream.v1.MysqlColumn DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.MysqlColumn(); } public static com.google.cloud.datastream.v1.MysqlColumn getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MysqlColumn parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MysqlColumn(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.MysqlColumn getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy