Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dataplex/v1/metadata.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.dataplex.v1;
/**
*
*
*
* Describes the format of the data within its storage location.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.StorageFormat}
*/
public final class StorageFormat extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.StorageFormat)
StorageFormatOrBuilder {
private static final long serialVersionUID = 0L;
// Use StorageFormat.newBuilder() to construct.
private StorageFormat(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StorageFormat() {
format_ = 0;
compressionFormat_ = 0;
mimeType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new StorageFormat();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.MetadataProto
.internal_static_google_cloud_dataplex_v1_StorageFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.MetadataProto
.internal_static_google_cloud_dataplex_v1_StorageFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.StorageFormat.class,
com.google.cloud.dataplex.v1.StorageFormat.Builder.class);
}
/**
*
*
*
* The specific file format of the data.
*
*
* Protobuf enum {@code google.cloud.dataplex.v1.StorageFormat.Format}
*/
public enum Format implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
*
* FORMAT_UNSPECIFIED = 0;
*/
public static final int FORMAT_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Parquet-formatted structured data.
*
*
* PARQUET = 1;
*/
public static final int PARQUET_VALUE = 1;
/**
*
*
*
* Avro-formatted structured data.
*
*
* AVRO = 2;
*/
public static final int AVRO_VALUE = 2;
/**
*
*
*
* Orc-formatted structured data.
*
*
* ORC = 3;
*/
public static final int ORC_VALUE = 3;
/**
*
*
*
* Csv-formatted semi-structured data.
*
*
* CSV = 100;
*/
public static final int CSV_VALUE = 100;
/**
*
*
*
* Json-formatted semi-structured data.
*
*
* JSON = 101;
*/
public static final int JSON_VALUE = 101;
/**
*
*
*
* Image data formats (such as jpg and png).
*
*
* IMAGE = 200;
*/
public static final int IMAGE_VALUE = 200;
/**
*
*
*
* Audio data formats (such as mp3, and wav).
*
*
* AUDIO = 201;
*/
public static final int AUDIO_VALUE = 201;
/**
*
*
*
* Video data formats (such as mp4 and mpg).
*
*
* VIDEO = 202;
*/
public static final int VIDEO_VALUE = 202;
/**
*
*
*
* Textual data formats (such as txt and xml).
*
*
* TEXT = 203;
*/
public static final int TEXT_VALUE = 203;
/**
*
*
*
* TensorFlow record format.
*
*
* TFRECORD = 204;
*/
public static final int TFRECORD_VALUE = 204;
/**
*
*
*
* Data that doesn't match a specific format.
*
*
* OTHER = 1000;
*/
public static final int OTHER_VALUE = 1000;
/**
*
*
*
* Data of an unknown format.
*
*
* UNKNOWN = 1001;
*/
public static final int UNKNOWN_VALUE = 1001;
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 Format 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 Format forNumber(int value) {
switch (value) {
case 0:
return FORMAT_UNSPECIFIED;
case 1:
return PARQUET;
case 2:
return AVRO;
case 3:
return ORC;
case 100:
return CSV;
case 101:
return JSON;
case 200:
return IMAGE;
case 201:
return AUDIO;
case 202:
return VIDEO;
case 203:
return TEXT;
case 204:
return TFRECORD;
case 1000:
return OTHER;
case 1001:
return UNKNOWN;
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 Format findValueByNumber(int number) {
return Format.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.dataplex.v1.StorageFormat.getDescriptor().getEnumTypes().get(0);
}
private static final Format[] VALUES = values();
public static Format 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 Format(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.StorageFormat.Format)
}
/**
*
*
*
* The specific compressed file format of the data.
*
*
* COMPRESSION_FORMAT_UNSPECIFIED = 0;
*/
public static final int COMPRESSION_FORMAT_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* GZip compressed set of files.
*
*
* GZIP = 2;
*/
public static final int GZIP_VALUE = 2;
/**
*
*
*
* BZip2 compressed set of files.
*
*
* BZIP2 = 3;
*/
public static final int BZIP2_VALUE = 3;
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 CompressionFormat 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 CompressionFormat forNumber(int value) {
switch (value) {
case 0:
return COMPRESSION_FORMAT_UNSPECIFIED;
case 2:
return GZIP;
case 3:
return BZIP2;
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 CompressionFormat findValueByNumber(int number) {
return CompressionFormat.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.dataplex.v1.StorageFormat.getDescriptor().getEnumTypes().get(1);
}
private static final CompressionFormat[] VALUES = values();
public static CompressionFormat 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 CompressionFormat(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.StorageFormat.CompressionFormat)
}
public interface CsvOptionsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.StorageFormat.CsvOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. The character encoding of the data. Accepts "US-ASCII",
* "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The delimiter used to separate values. Defaults to ','.
*
*
* string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for delimiter.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDelimiterBytes() {
java.lang.Object ref = delimiter_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
delimiter_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUOTE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object quote_ = "";
/**
*
*
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The delimiter used to separate values. Defaults to ','.
*
*
* string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for delimiter to set.
* @return This builder for chaining.
*/
public Builder setDelimiterBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
delimiter_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object quote_ = "";
/**
*
*
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
*
* string quote = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The quote to set.
* @return This builder for chaining.
*/
public Builder setQuote(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
quote_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
* Optional. The character used to quote column values. Accepts '"'
* (double quotation mark) or ''' (single quotation mark). Defaults to
* '"' (double quotation mark) if unspecified.
*
*
* string quote = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for quote to set.
* @return This builder for chaining.
*/
public Builder setQuoteBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
quote_ = value;
bitField0_ |= 0x00000008;
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.dataplex.v1.StorageFormat.CsvOptions)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.StorageFormat.CsvOptions)
private static final com.google.cloud.dataplex.v1.StorageFormat.CsvOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.StorageFormat.CsvOptions();
}
public static com.google.cloud.dataplex.v1.StorageFormat.CsvOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CsvOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.CsvOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface JsonOptionsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.StorageFormat.JsonOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
* and "ISO-8859-1". Defaults to UTF-8 if not specified.
*
* Optional. The location of where the iceberg metadata is present, must be
* within the table path
*
*
* string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for metadataLocation to set.
* @return This builder for chaining.
*/
public Builder setMetadataLocationBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
metadataLocation_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.StorageFormat.IcebergOptions)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.StorageFormat.IcebergOptions)
private static final com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions();
}
public static com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public IcebergOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int optionsCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object options_;
public enum OptionsCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CSV(10),
JSON(11),
ICEBERG(12),
OPTIONS_NOT_SET(0);
private final int value;
private OptionsCase(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 OptionsCase valueOf(int value) {
return forNumber(value);
}
public static OptionsCase forNumber(int value) {
switch (value) {
case 10:
return CSV;
case 11:
return JSON;
case 12:
return ICEBERG;
case 0:
return OPTIONS_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public OptionsCase getOptionsCase() {
return OptionsCase.forNumber(optionsCase_);
}
public static final int FORMAT_FIELD_NUMBER = 1;
private int format_ = 0;
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for format.
*/
@java.lang.Override
public int getFormatValue() {
return format_;
}
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The format.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.Format getFormat() {
com.google.cloud.dataplex.v1.StorageFormat.Format result =
com.google.cloud.dataplex.v1.StorageFormat.Format.forNumber(format_);
return result == null ? com.google.cloud.dataplex.v1.StorageFormat.Format.UNRECOGNIZED : result;
}
public static final int COMPRESSION_FORMAT_FIELD_NUMBER = 2;
private int compressionFormat_ = 0;
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for compressionFormat.
*/
@java.lang.Override
public int getCompressionFormatValue() {
return compressionFormat_;
}
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The compressionFormat.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat getCompressionFormat() {
com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat result =
com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat.forNumber(compressionFormat_);
return result == null
? com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat.UNRECOGNIZED
: result;
}
public static final int MIME_TYPE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object mimeType_ = "";
/**
*
*
*
* Required. The mime type descriptor for the data. Must match the pattern
* {type}/{subtype}. Supported values:
*
* - application/x-parquet
* - application/x-avro
* - application/x-orc
* - application/x-tfrecord
* - application/x-parquet+iceberg
* - application/x-avro+iceberg
* - application/x-orc+iceberg
* - application/json
* - application/{subtypes}
* - text/csv
* - text/<subtypes>
* - image/{image subtype}
* - video/{video subtype}
* - audio/{audio subtype}
*
* Optional. Additional information about iceberg tables.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsOrBuilder getIcebergOrBuilder() {
if (optionsCase_ == 12) {
return (com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) options_;
}
return com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.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 (format_
!= com.google.cloud.dataplex.v1.StorageFormat.Format.FORMAT_UNSPECIFIED.getNumber()) {
output.writeEnum(1, format_);
}
if (compressionFormat_
!= com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat
.COMPRESSION_FORMAT_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, compressionFormat_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_);
}
if (optionsCase_ == 10) {
output.writeMessage(10, (com.google.cloud.dataplex.v1.StorageFormat.CsvOptions) options_);
}
if (optionsCase_ == 11) {
output.writeMessage(11, (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_);
}
if (optionsCase_ == 12) {
output.writeMessage(12, (com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) options_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (format_
!= com.google.cloud.dataplex.v1.StorageFormat.Format.FORMAT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, format_);
}
if (compressionFormat_
!= com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat
.COMPRESSION_FORMAT_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, compressionFormat_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_);
}
if (optionsCase_ == 10) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
10, (com.google.cloud.dataplex.v1.StorageFormat.CsvOptions) options_);
}
if (optionsCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
11, (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_);
}
if (optionsCase_ == 12) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
12, (com.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) options_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dataplex.v1.StorageFormat)) {
return super.equals(obj);
}
com.google.cloud.dataplex.v1.StorageFormat other =
(com.google.cloud.dataplex.v1.StorageFormat) obj;
if (format_ != other.format_) return false;
if (compressionFormat_ != other.compressionFormat_) return false;
if (!getMimeType().equals(other.getMimeType())) return false;
if (!getOptionsCase().equals(other.getOptionsCase())) return false;
switch (optionsCase_) {
case 10:
if (!getCsv().equals(other.getCsv())) return false;
break;
case 11:
if (!getJson().equals(other.getJson())) return false;
break;
case 12:
if (!getIceberg().equals(other.getIceberg())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FORMAT_FIELD_NUMBER;
hash = (53 * hash) + format_;
hash = (37 * hash) + COMPRESSION_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + compressionFormat_;
hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMimeType().hashCode();
switch (optionsCase_) {
case 10:
hash = (37 * hash) + CSV_FIELD_NUMBER;
hash = (53 * hash) + getCsv().hashCode();
break;
case 11:
hash = (37 * hash) + JSON_FIELD_NUMBER;
hash = (53 * hash) + getJson().hashCode();
break;
case 12:
hash = (37 * hash) + ICEBERG_FIELD_NUMBER;
hash = (53 * hash) + getIceberg().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataplex.v1.StorageFormat parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.StorageFormat 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.dataplex.v1.StorageFormat parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.StorageFormat 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.dataplex.v1.StorageFormat parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.StorageFormat parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataplex.v1.StorageFormat parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.StorageFormat 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.dataplex.v1.StorageFormat parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.StorageFormat 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.dataplex.v1.StorageFormat parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.StorageFormat 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.dataplex.v1.StorageFormat 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;
}
/**
*
*
*
* Describes the format of the data within its storage location.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.StorageFormat}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.StorageFormat)
com.google.cloud.dataplex.v1.StorageFormatOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.MetadataProto
.internal_static_google_cloud_dataplex_v1_StorageFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.MetadataProto
.internal_static_google_cloud_dataplex_v1_StorageFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.StorageFormat.class,
com.google.cloud.dataplex.v1.StorageFormat.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.StorageFormat.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
format_ = 0;
compressionFormat_ = 0;
mimeType_ = "";
if (csvBuilder_ != null) {
csvBuilder_.clear();
}
if (jsonBuilder_ != null) {
jsonBuilder_.clear();
}
if (icebergBuilder_ != null) {
icebergBuilder_.clear();
}
optionsCase_ = 0;
options_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.MetadataProto
.internal_static_google_cloud_dataplex_v1_StorageFormat_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.StorageFormat.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat build() {
com.google.cloud.dataplex.v1.StorageFormat result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat buildPartial() {
com.google.cloud.dataplex.v1.StorageFormat result =
new com.google.cloud.dataplex.v1.StorageFormat(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.StorageFormat result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.format_ = format_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.compressionFormat_ = compressionFormat_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.mimeType_ = mimeType_;
}
}
private void buildPartialOneofs(com.google.cloud.dataplex.v1.StorageFormat result) {
result.optionsCase_ = optionsCase_;
result.options_ = this.options_;
if (optionsCase_ == 10 && csvBuilder_ != null) {
result.options_ = csvBuilder_.build();
}
if (optionsCase_ == 11 && jsonBuilder_ != null) {
result.options_ = jsonBuilder_.build();
}
if (optionsCase_ == 12 && icebergBuilder_ != null) {
result.options_ = icebergBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataplex.v1.StorageFormat) {
return mergeFrom((com.google.cloud.dataplex.v1.StorageFormat) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.StorageFormat other) {
if (other == com.google.cloud.dataplex.v1.StorageFormat.getDefaultInstance()) return this;
if (other.format_ != 0) {
setFormatValue(other.getFormatValue());
}
if (other.compressionFormat_ != 0) {
setCompressionFormatValue(other.getCompressionFormatValue());
}
if (!other.getMimeType().isEmpty()) {
mimeType_ = other.mimeType_;
bitField0_ |= 0x00000004;
onChanged();
}
switch (other.getOptionsCase()) {
case CSV:
{
mergeCsv(other.getCsv());
break;
}
case JSON:
{
mergeJson(other.getJson());
break;
}
case ICEBERG:
{
mergeIceberg(other.getIceberg());
break;
}
case OPTIONS_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
format_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
compressionFormat_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
mimeType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 82:
{
input.readMessage(getCsvFieldBuilder().getBuilder(), extensionRegistry);
optionsCase_ = 10;
break;
} // case 82
case 90:
{
input.readMessage(getJsonFieldBuilder().getBuilder(), extensionRegistry);
optionsCase_ = 11;
break;
} // case 90
case 98:
{
input.readMessage(getIcebergFieldBuilder().getBuilder(), extensionRegistry);
optionsCase_ = 12;
break;
} // case 98
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int optionsCase_ = 0;
private java.lang.Object options_;
public OptionsCase getOptionsCase() {
return OptionsCase.forNumber(optionsCase_);
}
public Builder clearOptions() {
optionsCase_ = 0;
options_ = null;
onChanged();
return this;
}
private int bitField0_;
private int format_ = 0;
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for format.
*/
@java.lang.Override
public int getFormatValue() {
return format_;
}
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for format to set.
* @return This builder for chaining.
*/
public Builder setFormatValue(int value) {
format_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The format.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.Format getFormat() {
com.google.cloud.dataplex.v1.StorageFormat.Format result =
com.google.cloud.dataplex.v1.StorageFormat.Format.forNumber(format_);
return result == null
? com.google.cloud.dataplex.v1.StorageFormat.Format.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The format to set.
* @return This builder for chaining.
*/
public Builder setFormat(com.google.cloud.dataplex.v1.StorageFormat.Format value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
format_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The data format associated with the stored data, which
* represents content type values. The value is inferred from mime type.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearFormat() {
bitField0_ = (bitField0_ & ~0x00000001);
format_ = 0;
onChanged();
return this;
}
private int compressionFormat_ = 0;
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for compressionFormat.
*/
@java.lang.Override
public int getCompressionFormatValue() {
return compressionFormat_;
}
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for compressionFormat to set.
* @return This builder for chaining.
*/
public Builder setCompressionFormatValue(int value) {
compressionFormat_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The compressionFormat.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat getCompressionFormat() {
com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat result =
com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat.forNumber(
compressionFormat_);
return result == null
? com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*
*
*
* .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The compressionFormat to set.
* @return This builder for chaining.
*/
public Builder setCompressionFormat(
com.google.cloud.dataplex.v1.StorageFormat.CompressionFormat value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
compressionFormat_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. The compression type associated with the stored data.
* If unspecified, the data is uncompressed.
*