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/resources.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.dataplex.v1;
/**
*
*
*
* An asset represents a cloud resource that is being managed within a lake as a
* member of a zone.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset}
*/
public final class Asset extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Asset)
AssetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Asset.newBuilder() to construct.
private Asset(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Asset() {
name_ = "";
displayName_ = "";
uid_ = "";
description_ = "";
state_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Asset();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 6:
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.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.class,
com.google.cloud.dataplex.v1.Asset.Builder.class);
}
public interface SecurityStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Asset.SecurityStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The state.
*/
com.google.cloud.dataplex.v1.Asset.SecurityStatus.State getState();
/**
*
*
*
* Additional information about the current state.
*
* Security policy status of the asset. Data security policy, i.e., readers,
* writers & owners, should be specified in the lake/zone/asset IAM policy.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.SecurityStatus}
*/
public static final class SecurityStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Asset.SecurityStatus)
SecurityStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use SecurityStatus.newBuilder() to construct.
private SecurityStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SecurityStatus() {
state_ = 0;
message_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SecurityStatus();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.SecurityStatus.class,
com.google.cloud.dataplex.v1.Asset.SecurityStatus.Builder.class);
}
/**
*
*
*
* The state of the security policy.
*
*
* Protobuf enum {@code google.cloud.dataplex.v1.Asset.SecurityStatus.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Security policy has been successfully applied to the attached resource.
*
*
* READY = 1;
*/
public static final int READY_VALUE = 1;
/**
*
*
*
* Security policy is in the process of being applied to the attached
* resource.
*
*
* APPLYING = 2;
*/
public static final int APPLYING_VALUE = 2;
/**
*
*
*
* Security policy could not be applied to the attached resource due to
* errors.
*
*
* ERROR = 3;
*/
public static final int ERROR_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 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 READY;
case 2:
return APPLYING;
case 3:
return ERROR;
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.dataplex.v1.Asset.SecurityStatus.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.dataplex.v1.Asset.SecurityStatus.State)
}
private int bitField0_;
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.SecurityStatus.State result =
com.google.cloud.dataplex.v1.Asset.SecurityStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.SecurityStatus.State.UNRECOGNIZED
: result;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
* Security policy status of the asset. Data security policy, i.e., readers,
* writers & owners, should be specified in the lake/zone/asset IAM policy.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.SecurityStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.SecurityStatus)
com.google.cloud.dataplex.v1.Asset.SecurityStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.SecurityStatus.class,
com.google.cloud.dataplex.v1.Asset.SecurityStatus.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.SecurityStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getUpdateTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
message_ = "";
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatus getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.SecurityStatus.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatus build() {
com.google.cloud.dataplex.v1.Asset.SecurityStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatus buildPartial() {
com.google.cloud.dataplex.v1.Asset.SecurityStatus result =
new com.google.cloud.dataplex.v1.Asset.SecurityStatus(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset.SecurityStatus result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.message_ = message_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.updateTime_ =
updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataplex.v1.Asset.SecurityStatus) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.SecurityStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.SecurityStatus other) {
if (other == com.google.cloud.dataplex.v1.Asset.SecurityStatus.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.SecurityStatus.State result =
com.google.cloud.dataplex.v1.Asset.SecurityStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.SecurityStatus.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.dataplex.v1.Asset.SecurityStatus.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The current state of the security policy applied to the attached
* resource.
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000001);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the includePatterns.
*/
java.util.List getIncludePatternsList();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of includePatterns.
*/
int getIncludePatternsCount();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The includePatterns at the given index.
*/
java.lang.String getIncludePatterns(int index);
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the includePatterns at the given index.
*/
com.google.protobuf.ByteString getIncludePatternsBytes(int index);
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the excludePatterns.
*/
java.util.List getExcludePatternsList();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of excludePatterns.
*/
int getExcludePatternsCount();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The excludePatterns at the given index.
*/
java.lang.String getExcludePatterns(int index);
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the excludePatterns at the given index.
*/
com.google.protobuf.ByteString getExcludePatternsBytes(int index);
/**
*
*
*
* Optional. Configuration for CSV data.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the csvOptions field is set.
*/
boolean hasCsvOptions();
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the schedule field is set.
*/
boolean hasSchedule();
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
* Optional. Whether to disable the inference of data type for Json data.
* If true, all columns will be registered as their primitive types
* (strings, number or boolean).
*
* Optional. The character encoding of the data. The default is UTF-8.
*
*
* string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for encoding.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEncodingBytes() {
java.lang.Object ref = encoding_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
encoding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISABLE_TYPE_INFERENCE_FIELD_NUMBER = 2;
private boolean disableTypeInference_ = false;
/**
*
*
*
* Optional. Whether to disable the inference of data type for Json data.
* If true, all columns will be registered as their primitive types
* (strings, number or boolean).
*
* Optional. The character encoding of the data. The default is UTF-8.
*
*
* string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for encoding to set.
* @return This builder for chaining.
*/
public Builder setEncodingBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
encoding_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean disableTypeInference_;
/**
*
*
*
* Optional. Whether to disable the inference of data type for Json data.
* If true, all columns will be registered as their primitive types
* (strings, number or boolean).
*
* Optional. Whether to disable the inference of data type for Json data.
* If true, all columns will be registered as their primitive types
* (strings, number or boolean).
*
*
* bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The disableTypeInference to set.
* @return This builder for chaining.
*/
public Builder setDisableTypeInference(boolean value) {
disableTypeInference_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Whether to disable the inference of data type for Json data.
* If true, all columns will be registered as their primitive types
* (strings, number or boolean).
*
*
* bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDisableTypeInference() {
bitField0_ = (bitField0_ & ~0x00000002);
disableTypeInference_ = false;
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.Asset.DiscoverySpec.JsonOptions)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions)
private static final com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions();
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public JsonOptions 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.Asset.DiscoverySpec.JsonOptions
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int triggerCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object trigger_;
public enum TriggerCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SCHEDULE(10),
TRIGGER_NOT_SET(0);
private final int value;
private TriggerCase(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 TriggerCase valueOf(int value) {
return forNumber(value);
}
public static TriggerCase forNumber(int value) {
switch (value) {
case 10:
return SCHEDULE;
case 0:
return TRIGGER_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public TriggerCase getTriggerCase() {
return TriggerCase.forNumber(triggerCase_);
}
public static final int ENABLED_FIELD_NUMBER = 1;
private boolean enabled_ = false;
/**
*
*
*
* Optional. Whether discovery is enabled.
*
*
* bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The enabled.
*/
@java.lang.Override
public boolean getEnabled() {
return enabled_;
}
public static final int INCLUDE_PATTERNS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList includePatterns_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the includePatterns.
*/
public com.google.protobuf.ProtocolStringList getIncludePatternsList() {
return includePatterns_;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of includePatterns.
*/
public int getIncludePatternsCount() {
return includePatterns_.size();
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The includePatterns at the given index.
*/
public java.lang.String getIncludePatterns(int index) {
return includePatterns_.get(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the includePatterns at the given index.
*/
public com.google.protobuf.ByteString getIncludePatternsBytes(int index) {
return includePatterns_.getByteString(index);
}
public static final int EXCLUDE_PATTERNS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList excludePatterns_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the excludePatterns.
*/
public com.google.protobuf.ProtocolStringList getExcludePatternsList() {
return excludePatterns_;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of excludePatterns.
*/
public int getExcludePatternsCount() {
return excludePatterns_.size();
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The excludePatterns at the given index.
*/
public java.lang.String getExcludePatterns(int index) {
return excludePatterns_.get(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the excludePatterns at the given index.
*/
public com.google.protobuf.ByteString getExcludePatternsBytes(int index) {
return excludePatterns_.getByteString(index);
}
public static final int CSV_OPTIONS_FIELD_NUMBER = 4;
private com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csvOptions_;
/**
*
*
*
* Optional. Configuration for CSV data.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the csvOptions field is set.
*/
@java.lang.Override
public boolean hasCsvOptions() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsOrBuilder
getJsonOptionsOrBuilder() {
return jsonOptions_ == null
? com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.getDefaultInstance()
: jsonOptions_;
}
public static final int SCHEDULE_FIELD_NUMBER = 10;
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the schedule field is set.
*/
public boolean hasSchedule() {
return triggerCase_ == 10;
}
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for schedule.
*/
public com.google.protobuf.ByteString getScheduleBytes() {
java.lang.Object ref = "";
if (triggerCase_ == 10) {
ref = trigger_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (triggerCase_ == 10) {
trigger_ = 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 (enabled_ != false) {
output.writeBool(1, enabled_);
}
for (int i = 0; i < includePatterns_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, includePatterns_.getRaw(i));
}
for (int i = 0; i < excludePatterns_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, excludePatterns_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getCsvOptions());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getJsonOptions());
}
if (triggerCase_ == 10) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, trigger_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_);
}
{
int dataSize = 0;
for (int i = 0; i < includePatterns_.size(); i++) {
dataSize += computeStringSizeNoTag(includePatterns_.getRaw(i));
}
size += dataSize;
size += 1 * getIncludePatternsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < excludePatterns_.size(); i++) {
dataSize += computeStringSizeNoTag(excludePatterns_.getRaw(i));
}
size += dataSize;
size += 1 * getExcludePatternsList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCsvOptions());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getJsonOptions());
}
if (triggerCase_ == 10) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, trigger_);
}
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.Asset.DiscoverySpec)) {
return super.equals(obj);
}
com.google.cloud.dataplex.v1.Asset.DiscoverySpec other =
(com.google.cloud.dataplex.v1.Asset.DiscoverySpec) obj;
if (getEnabled() != other.getEnabled()) return false;
if (!getIncludePatternsList().equals(other.getIncludePatternsList())) return false;
if (!getExcludePatternsList().equals(other.getExcludePatternsList())) return false;
if (hasCsvOptions() != other.hasCsvOptions()) return false;
if (hasCsvOptions()) {
if (!getCsvOptions().equals(other.getCsvOptions())) return false;
}
if (hasJsonOptions() != other.hasJsonOptions()) return false;
if (hasJsonOptions()) {
if (!getJsonOptions().equals(other.getJsonOptions())) return false;
}
if (!getTriggerCase().equals(other.getTriggerCase())) return false;
switch (triggerCase_) {
case 10:
if (!getSchedule().equals(other.getSchedule())) 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) + ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled());
if (getIncludePatternsCount() > 0) {
hash = (37 * hash) + INCLUDE_PATTERNS_FIELD_NUMBER;
hash = (53 * hash) + getIncludePatternsList().hashCode();
}
if (getExcludePatternsCount() > 0) {
hash = (37 * hash) + EXCLUDE_PATTERNS_FIELD_NUMBER;
hash = (53 * hash) + getExcludePatternsList().hashCode();
}
if (hasCsvOptions()) {
hash = (37 * hash) + CSV_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getCsvOptions().hashCode();
}
if (hasJsonOptions()) {
hash = (37 * hash) + JSON_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getJsonOptions().hashCode();
}
switch (triggerCase_) {
case 10:
hash = (37 * hash) + SCHEDULE_FIELD_NUMBER;
hash = (53 * hash) + getSchedule().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec 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.Asset.DiscoverySpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec 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.Asset.DiscoverySpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec 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.Asset.DiscoverySpec parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec 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.Asset.DiscoverySpec parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec 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.Asset.DiscoverySpec 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.Asset.DiscoverySpec 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.Asset.DiscoverySpec 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;
}
/**
*
*
*
* Settings to manage the metadata discovery and publishing for an asset.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.DiscoverySpec}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.DiscoverySpec)
com.google.cloud.dataplex.v1.Asset.DiscoverySpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.DiscoverySpec.class,
com.google.cloud.dataplex.v1.Asset.DiscoverySpec.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.DiscoverySpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCsvOptionsFieldBuilder();
getJsonOptionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
enabled_ = false;
includePatterns_ = com.google.protobuf.LazyStringArrayList.emptyList();
excludePatterns_ = com.google.protobuf.LazyStringArrayList.emptyList();
csvOptions_ = null;
if (csvOptionsBuilder_ != null) {
csvOptionsBuilder_.dispose();
csvOptionsBuilder_ = null;
}
jsonOptions_ = null;
if (jsonOptionsBuilder_ != null) {
jsonOptionsBuilder_.dispose();
jsonOptionsBuilder_ = null;
}
triggerCase_ = 0;
trigger_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoverySpec getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.DiscoverySpec.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoverySpec build() {
com.google.cloud.dataplex.v1.Asset.DiscoverySpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoverySpec buildPartial() {
com.google.cloud.dataplex.v1.Asset.DiscoverySpec result =
new com.google.cloud.dataplex.v1.Asset.DiscoverySpec(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset.DiscoverySpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.enabled_ = enabled_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
includePatterns_.makeImmutable();
result.includePatterns_ = includePatterns_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
excludePatterns_.makeImmutable();
result.excludePatterns_ = excludePatterns_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.csvOptions_ =
csvOptionsBuilder_ == null ? csvOptions_ : csvOptionsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.jsonOptions_ =
jsonOptionsBuilder_ == null ? jsonOptions_ : jsonOptionsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.dataplex.v1.Asset.DiscoverySpec result) {
result.triggerCase_ = triggerCase_;
result.trigger_ = this.trigger_;
}
@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.Asset.DiscoverySpec) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.DiscoverySpec) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoverySpec other) {
if (other == com.google.cloud.dataplex.v1.Asset.DiscoverySpec.getDefaultInstance())
return this;
if (other.getEnabled() != false) {
setEnabled(other.getEnabled());
}
if (!other.includePatterns_.isEmpty()) {
if (includePatterns_.isEmpty()) {
includePatterns_ = other.includePatterns_;
bitField0_ |= 0x00000002;
} else {
ensureIncludePatternsIsMutable();
includePatterns_.addAll(other.includePatterns_);
}
onChanged();
}
if (!other.excludePatterns_.isEmpty()) {
if (excludePatterns_.isEmpty()) {
excludePatterns_ = other.excludePatterns_;
bitField0_ |= 0x00000004;
} else {
ensureExcludePatternsIsMutable();
excludePatterns_.addAll(other.excludePatterns_);
}
onChanged();
}
if (other.hasCsvOptions()) {
mergeCsvOptions(other.getCsvOptions());
}
if (other.hasJsonOptions()) {
mergeJsonOptions(other.getJsonOptions());
}
switch (other.getTriggerCase()) {
case SCHEDULE:
{
triggerCase_ = 10;
trigger_ = other.trigger_;
onChanged();
break;
}
case TRIGGER_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:
{
enabled_ = input.readBool();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureIncludePatternsIsMutable();
includePatterns_.add(s);
break;
} // case 18
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
ensureExcludePatternsIsMutable();
excludePatterns_.add(s);
break;
} // case 26
case 34:
{
input.readMessage(getCsvOptionsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input.readMessage(getJsonOptionsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 82:
{
java.lang.String s = input.readStringRequireUtf8();
triggerCase_ = 10;
trigger_ = s;
break;
} // case 82
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 triggerCase_ = 0;
private java.lang.Object trigger_;
public TriggerCase getTriggerCase() {
return TriggerCase.forNumber(triggerCase_);
}
public Builder clearTrigger() {
triggerCase_ = 0;
trigger_ = null;
onChanged();
return this;
}
private int bitField0_;
private boolean enabled_;
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the includePatterns.
*/
public com.google.protobuf.ProtocolStringList getIncludePatternsList() {
includePatterns_.makeImmutable();
return includePatterns_;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of includePatterns.
*/
public int getIncludePatternsCount() {
return includePatterns_.size();
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The includePatterns at the given index.
*/
public java.lang.String getIncludePatterns(int index) {
return includePatterns_.get(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the includePatterns at the given index.
*/
public com.google.protobuf.ByteString getIncludePatternsBytes(int index) {
return includePatterns_.getByteString(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The includePatterns to set.
* @return This builder for chaining.
*/
public Builder setIncludePatterns(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludePatternsIsMutable();
includePatterns_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The includePatterns to add.
* @return This builder for chaining.
*/
public Builder addIncludePatterns(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludePatternsIsMutable();
includePatterns_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The includePatterns to add.
* @return This builder for chaining.
*/
public Builder addAllIncludePatterns(java.lang.Iterable values) {
ensureIncludePatternsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includePatterns_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
* Optional. The list of patterns to apply for selecting data to include
* during discovery if only a subset of the data should considered. For
* Cloud Storage bucket assets, these are interpreted as glob patterns used
* to match object names. For BigQuery dataset assets, these are interpreted
* as patterns to match table names.
*
*
* repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the includePatterns to add.
* @return This builder for chaining.
*/
public Builder addIncludePatternsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureIncludePatternsIsMutable();
includePatterns_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList excludePatterns_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureExcludePatternsIsMutable() {
if (!excludePatterns_.isModifiable()) {
excludePatterns_ = new com.google.protobuf.LazyStringArrayList(excludePatterns_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the excludePatterns.
*/
public com.google.protobuf.ProtocolStringList getExcludePatternsList() {
excludePatterns_.makeImmutable();
return excludePatterns_;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of excludePatterns.
*/
public int getExcludePatternsCount() {
return excludePatterns_.size();
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The excludePatterns at the given index.
*/
public java.lang.String getExcludePatterns(int index) {
return excludePatterns_.get(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the excludePatterns at the given index.
*/
public com.google.protobuf.ByteString getExcludePatternsBytes(int index) {
return excludePatterns_.getByteString(index);
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The excludePatterns to set.
* @return This builder for chaining.
*/
public Builder setExcludePatterns(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludePatternsIsMutable();
excludePatterns_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The excludePatterns to add.
* @return This builder for chaining.
*/
public Builder addExcludePatterns(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludePatternsIsMutable();
excludePatterns_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The excludePatterns to add.
* @return This builder for chaining.
*/
public Builder addAllExcludePatterns(java.lang.Iterable values) {
ensureExcludePatternsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludePatterns_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
* Optional. The list of patterns to apply for selecting data to exclude
* during discovery. For Cloud Storage bucket assets, these are interpreted
* as glob patterns used to match object names. For BigQuery dataset assets,
* these are interpreted as patterns to match table names.
*
*
* repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the excludePatterns to add.
* @return This builder for chaining.
*/
public Builder addExcludePatternsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExcludePatternsIsMutable();
excludePatterns_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csvOptions_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions,
com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.Builder,
com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsOrBuilder>
csvOptionsBuilder_;
/**
*
*
*
* Optional. Configuration for CSV data.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the csvOptions field is set.
*/
public boolean hasCsvOptions() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the schedule field is set.
*/
@java.lang.Override
public boolean hasSchedule() {
return triggerCase_ == 10;
}
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for schedule.
*/
@java.lang.Override
public com.google.protobuf.ByteString getScheduleBytes() {
java.lang.Object ref = "";
if (triggerCase_ == 10) {
ref = trigger_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (triggerCase_ == 10) {
trigger_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The schedule to set.
* @return This builder for chaining.
*/
public Builder setSchedule(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
triggerCase_ = 10;
trigger_ = value;
onChanged();
return this;
}
/**
*
*
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
* Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for
* running discovery periodically. Successive discovery runs must be
* scheduled at least 60 minutes apart. The default value is to run
* discovery every 60 minutes. To explicitly set a timezone to the cron
* tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
* TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string
* from IANA time zone database. For example, `CRON_TZ=America/New_York 1
* * * * *`, or `TZ=America/New_York 1 * * * *`.
*
*
* string schedule = 10 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for schedule to set.
* @return This builder for chaining.
*/
public Builder setScheduleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
triggerCase_ = 10;
trigger_ = 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.dataplex.v1.Asset.DiscoverySpec)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.DiscoverySpec)
private static final com.google.cloud.dataplex.v1.Asset.DiscoverySpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.DiscoverySpec();
}
public static com.google.cloud.dataplex.v1.Asset.DiscoverySpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DiscoverySpec 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.Asset.DiscoverySpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceSpecOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Asset.ResourceSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for readAccessMode.
*/
int getReadAccessModeValue();
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
* TYPE_UNSPECIFIED = 0;
*/
public static final int TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Cloud Storage bucket.
*
*
* STORAGE_BUCKET = 1;
*/
public static final int STORAGE_BUCKET_VALUE = 1;
/**
*
*
*
* BigQuery dataset.
*
*
* BIGQUERY_DATASET = 2;
*/
public static final int BIGQUERY_DATASET_VALUE = 2;
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 Type 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 Type forNumber(int value) {
switch (value) {
case 0:
return TYPE_UNSPECIFIED;
case 1:
return STORAGE_BUCKET;
case 2:
return BIGQUERY_DATASET;
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 Type findValueByNumber(int number) {
return Type.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.Asset.ResourceSpec.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final Type[] VALUES = values();
public static Type 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 Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Asset.ResourceSpec.Type)
}
/**
*
*
*
* Access Mode determines how data stored within the resource is read. This
* is only applicable to storage bucket assets.
*
*
* ACCESS_MODE_UNSPECIFIED = 0;
*/
public static final int ACCESS_MODE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Default. Data is accessed directly using storage APIs.
*
*
* DIRECT = 1;
*/
public static final int DIRECT_VALUE = 1;
/**
*
*
*
* Data is accessed through a managed interface using BigQuery APIs.
*
*
* MANAGED = 2;
*/
public static final int MANAGED_VALUE = 2;
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 AccessMode 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 AccessMode forNumber(int value) {
switch (value) {
case 0:
return ACCESS_MODE_UNSPECIFIED;
case 1:
return DIRECT;
case 2:
return MANAGED;
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 AccessMode findValueByNumber(int number) {
return AccessMode.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.Asset.ResourceSpec.getDescriptor()
.getEnumTypes()
.get(1);
}
private static final AccessMode[] VALUES = values();
public static AccessMode 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 AccessMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode)
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @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 TYPE_FIELD_NUMBER = 2;
private int type_ = 0;
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The type.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type getType() {
com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type result =
com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.forNumber(type_);
return result == null
? com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.UNRECOGNIZED
: result;
}
public static final int READ_ACCESS_MODE_FIELD_NUMBER = 5;
private int readAccessMode_ = 0;
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for readAccessMode.
*/
@java.lang.Override
public int getReadAccessModeValue() {
return readAccessMode_;
}
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
* Identifies the cloud resource that is referenced by this asset.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.ResourceSpec}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.ResourceSpec)
com.google.cloud.dataplex.v1.Asset.ResourceSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.ResourceSpec.class,
com.google.cloud.dataplex.v1.Asset.ResourceSpec.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.ResourceSpec.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
type_ = 0;
readAccessMode_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceSpec_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.ResourceSpec.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec build() {
com.google.cloud.dataplex.v1.Asset.ResourceSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec buildPartial() {
com.google.cloud.dataplex.v1.Asset.ResourceSpec result =
new com.google.cloud.dataplex.v1.Asset.ResourceSpec(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset.ResourceSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.readAccessMode_ = readAccessMode_;
}
}
@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.Asset.ResourceSpec) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.ResourceSpec) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.ResourceSpec other) {
if (other == com.google.cloud.dataplex.v1.Asset.ResourceSpec.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.readAccessMode_ != 0) {
setReadAccessModeValue(other.getReadAccessModeValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
type_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 40:
{
readAccessMode_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 40
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @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;
}
}
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Immutable. Relative name of the cloud resource that contains the data
* that is being managed within a lake. For example:
* `projects/{project_number}/buckets/{bucket_id}`
* `projects/{project_number}/datasets/{dataset_id}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int type_ = 0;
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The type.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type getType() {
com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type result =
com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.forNumber(type_);
return result == null
? com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. Immutable. Type of resource.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
onChanged();
return this;
}
private int readAccessMode_ = 0;
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for readAccessMode.
*/
@java.lang.Override
public int getReadAccessModeValue() {
return readAccessMode_;
}
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for readAccessMode to set.
* @return This builder for chaining.
*/
public Builder setReadAccessModeValue(int value) {
readAccessMode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The readAccessMode.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode getReadAccessMode() {
com.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode result =
com.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode.forNumber(readAccessMode_);
return result == null
? com.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The readAccessMode to set.
* @return This builder for chaining.
*/
public Builder setReadAccessMode(
com.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
readAccessMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Determines how read permissions are handled for each asset and
* their associated tables. Only available to storage buckets assets.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearReadAccessMode() {
bitField0_ = (bitField0_ & ~0x00000004);
readAccessMode_ = 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.dataplex.v1.Asset.ResourceSpec)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.ResourceSpec)
private static final com.google.cloud.dataplex.v1.Asset.ResourceSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.ResourceSpec();
}
public static com.google.cloud.dataplex.v1.Asset.ResourceSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceSpec 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.Asset.ResourceSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Asset.ResourceStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The state.
*/
com.google.cloud.dataplex.v1.Asset.ResourceStatus.State getState();
/**
*
*
*
* Additional information about the current state.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Resource does not have any errors.
*
*
* READY = 1;
*/
public static final int READY_VALUE = 1;
/**
*
*
*
* Resource has errors.
*
*
* ERROR = 2;
*/
public static final int ERROR_VALUE = 2;
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 READY;
case 2:
return ERROR;
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.dataplex.v1.Asset.ResourceStatus.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.dataplex.v1.Asset.ResourceStatus.State)
}
private int bitField0_;
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.ResourceStatus.State result =
com.google.cloud.dataplex.v1.Asset.ResourceStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.ResourceStatus.State.UNRECOGNIZED
: result;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
* Status of the resource referenced by an asset.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.ResourceStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.ResourceStatus)
com.google.cloud.dataplex.v1.Asset.ResourceStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.ResourceStatus.class,
com.google.cloud.dataplex.v1.Asset.ResourceStatus.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.ResourceStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getUpdateTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
message_ = "";
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
managedAccessIdentity_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_ResourceStatus_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceStatus getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.ResourceStatus.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceStatus build() {
com.google.cloud.dataplex.v1.Asset.ResourceStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceStatus buildPartial() {
com.google.cloud.dataplex.v1.Asset.ResourceStatus result =
new com.google.cloud.dataplex.v1.Asset.ResourceStatus(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset.ResourceStatus result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.message_ = message_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.updateTime_ =
updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.managedAccessIdentity_ = managedAccessIdentity_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataplex.v1.Asset.ResourceStatus) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.ResourceStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.ResourceStatus other) {
if (other == com.google.cloud.dataplex.v1.Asset.ResourceStatus.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (!other.getManagedAccessIdentity().isEmpty()) {
managedAccessIdentity_ = other.managedAccessIdentity_;
bitField0_ |= 0x00000008;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
managedAccessIdentity_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.ResourceStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.ResourceStatus.State result =
com.google.cloud.dataplex.v1.Asset.ResourceStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.ResourceStatus.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.dataplex.v1.Asset.ResourceStatus.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The current state of the managed resource.
*
*
* .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000001);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
* Output only. Service account associated with the BigQuery Connection.
*
*
* string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The bytes for managedAccessIdentity to set.
* @return This builder for chaining.
*/
public Builder setManagedAccessIdentityBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
managedAccessIdentity_ = 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.Asset.ResourceStatus)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.ResourceStatus)
private static final com.google.cloud.dataplex.v1.Asset.ResourceStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.ResourceStatus();
}
public static com.google.cloud.dataplex.v1.Asset.ResourceStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceStatus 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.Asset.ResourceStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DiscoveryStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Asset.DiscoveryStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The state.
*/
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State getState();
/**
*
*
*
* Additional information about the current state.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Discovery for the asset is scheduled.
*
*
* SCHEDULED = 1;
*/
public static final int SCHEDULED_VALUE = 1;
/**
*
*
*
* Discovery for the asset is running.
*
*
* IN_PROGRESS = 2;
*/
public static final int IN_PROGRESS_VALUE = 2;
/**
*
*
*
* Discovery for the asset is currently paused (e.g. due to a lack
* of available resources). It will be automatically resumed.
*
*
* PAUSED = 3;
*/
public static final int PAUSED_VALUE = 3;
/**
*
*
*
* Discovery for the asset is disabled.
*
*
* DISABLED = 5;
*/
public static final int DISABLED_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return SCHEDULED;
case 2:
return IN_PROGRESS;
case 3:
return PAUSED;
case 5:
return DISABLED;
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.dataplex.v1.Asset.DiscoveryStatus.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.dataplex.v1.Asset.DiscoveryStatus.State)
}
public interface StatsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The count of data items within the referenced resource.
*
*
* int64 data_items = 1;
*
* @return The dataItems.
*/
long getDataItems();
/**
*
*
*
* The number of stored data bytes within the referenced resource.
*
*
* int64 data_size = 2;
*
* @return The dataSize.
*/
long getDataSize();
/**
*
*
*
* The count of table entities within the referenced resource.
*
*
* int64 tables = 3;
*
* @return The tables.
*/
long getTables();
/**
*
*
*
* The count of fileset entities within the referenced resource.
*
*
* int64 filesets = 4;
*
* @return The filesets.
*/
long getFilesets();
}
/**
*
*
*
* The aggregated data statistics for the asset reported by discovery.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats}
*/
public static final class Stats extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats)
StatsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Stats.newBuilder() to construct.
private Stats(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Stats() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Stats();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.class,
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.Builder.class);
}
public static final int DATA_ITEMS_FIELD_NUMBER = 1;
private long dataItems_ = 0L;
/**
*
*
*
* The count of data items within the referenced resource.
*
*
* int64 data_items = 1;
*
* @return The dataItems.
*/
@java.lang.Override
public long getDataItems() {
return dataItems_;
}
public static final int DATA_SIZE_FIELD_NUMBER = 2;
private long dataSize_ = 0L;
/**
*
*
*
* The number of stored data bytes within the referenced resource.
*
*
* int64 data_size = 2;
*
* @return The dataSize.
*/
@java.lang.Override
public long getDataSize() {
return dataSize_;
}
public static final int TABLES_FIELD_NUMBER = 3;
private long tables_ = 0L;
/**
*
*
*
* The count of table entities within the referenced resource.
*
*
* int64 tables = 3;
*
* @return The tables.
*/
@java.lang.Override
public long getTables() {
return tables_;
}
public static final int FILESETS_FIELD_NUMBER = 4;
private long filesets_ = 0L;
/**
*
*
*
* The count of fileset entities within the referenced resource.
*
* The aggregated data statistics for the asset reported by discovery.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats)
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.StatsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.class,
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
dataItems_ = 0L;
dataSize_ = 0L;
tables_ = 0L;
filesets_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats
getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats build() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats buildPartial() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats result =
new com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.dataItems_ = dataItems_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.dataSize_ = dataSize_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.tables_ = tables_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.filesets_ = filesets_;
}
}
@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.Asset.DiscoveryStatus.Stats) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats other) {
if (other
== com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.getDefaultInstance())
return this;
if (other.getDataItems() != 0L) {
setDataItems(other.getDataItems());
}
if (other.getDataSize() != 0L) {
setDataSize(other.getDataSize());
}
if (other.getTables() != 0L) {
setTables(other.getTables());
}
if (other.getFilesets() != 0L) {
setFilesets(other.getFilesets());
}
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:
{
dataItems_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
dataSize_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
tables_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
filesets_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long dataItems_;
/**
*
*
*
* The count of data items within the referenced resource.
*
*
* int64 data_items = 1;
*
* @return The dataItems.
*/
@java.lang.Override
public long getDataItems() {
return dataItems_;
}
/**
*
*
*
* The count of data items within the referenced resource.
*
*
* int64 data_items = 1;
*
* @param value The dataItems to set.
* @return This builder for chaining.
*/
public Builder setDataItems(long value) {
dataItems_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The count of data items within the referenced resource.
*
*
* int64 data_items = 1;
*
* @return This builder for chaining.
*/
public Builder clearDataItems() {
bitField0_ = (bitField0_ & ~0x00000001);
dataItems_ = 0L;
onChanged();
return this;
}
private long dataSize_;
/**
*
*
*
* The number of stored data bytes within the referenced resource.
*
*
* int64 data_size = 2;
*
* @return The dataSize.
*/
@java.lang.Override
public long getDataSize() {
return dataSize_;
}
/**
*
*
*
* The number of stored data bytes within the referenced resource.
*
*
* int64 data_size = 2;
*
* @param value The dataSize to set.
* @return This builder for chaining.
*/
public Builder setDataSize(long value) {
dataSize_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The number of stored data bytes within the referenced resource.
*
*
* int64 data_size = 2;
*
* @return This builder for chaining.
*/
public Builder clearDataSize() {
bitField0_ = (bitField0_ & ~0x00000002);
dataSize_ = 0L;
onChanged();
return this;
}
private long tables_;
/**
*
*
*
* The count of table entities within the referenced resource.
*
*
* int64 tables = 3;
*
* @return The tables.
*/
@java.lang.Override
public long getTables() {
return tables_;
}
/**
*
*
*
* The count of table entities within the referenced resource.
*
*
* int64 tables = 3;
*
* @param value The tables to set.
* @return This builder for chaining.
*/
public Builder setTables(long value) {
tables_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The count of table entities within the referenced resource.
*
*
* int64 tables = 3;
*
* @return This builder for chaining.
*/
public Builder clearTables() {
bitField0_ = (bitField0_ & ~0x00000004);
tables_ = 0L;
onChanged();
return this;
}
private long filesets_;
/**
*
*
*
* The count of fileset entities within the referenced resource.
*
*
* int64 filesets = 4;
*
* @return The filesets.
*/
@java.lang.Override
public long getFilesets() {
return filesets_;
}
/**
*
*
*
* The count of fileset entities within the referenced resource.
*
*
* int64 filesets = 4;
*
* @param value The filesets to set.
* @return This builder for chaining.
*/
public Builder setFilesets(long value) {
filesets_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The count of fileset entities within the referenced resource.
*
*
* int64 filesets = 4;
*
* @return This builder for chaining.
*/
public Builder clearFilesets() {
bitField0_ = (bitField0_ & ~0x00000008);
filesets_ = 0L;
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.Asset.DiscoveryStatus.Stats)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats)
private static final com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats();
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Stats 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.Asset.DiscoveryStatus.Stats getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State result =
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.UNRECOGNIZED
: result;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
*
* .google.protobuf.Duration last_run_duration = 7;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLastRunDurationOrBuilder() {
return lastRunDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: lastRunDuration_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (state_
!= com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getUpdateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getLastRunTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getStats());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(7, getLastRunDuration());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (state_
!= com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastRunTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStats());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastRunDuration());
}
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.Asset.DiscoveryStatus)) {
return super.equals(obj);
}
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus other =
(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus) obj;
if (state_ != other.state_) return false;
if (!getMessage().equals(other.getMessage())) return false;
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (hasLastRunTime() != other.hasLastRunTime()) return false;
if (hasLastRunTime()) {
if (!getLastRunTime().equals(other.getLastRunTime())) return false;
}
if (hasStats() != other.hasStats()) return false;
if (hasStats()) {
if (!getStats().equals(other.getStats())) return false;
}
if (hasLastRunDuration() != other.hasLastRunDuration()) return false;
if (hasLastRunDuration()) {
if (!getLastRunDuration().equals(other.getLastRunDuration())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
if (hasLastRunTime()) {
hash = (37 * hash) + LAST_RUN_TIME_FIELD_NUMBER;
hash = (53 * hash) + getLastRunTime().hashCode();
}
if (hasStats()) {
hash = (37 * hash) + STATS_FIELD_NUMBER;
hash = (53 * hash) + getStats().hashCode();
}
if (hasLastRunDuration()) {
hash = (37 * hash) + LAST_RUN_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getLastRunDuration().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus 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.Asset.DiscoveryStatus 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;
}
/**
*
*
*
* Status of discovery for an asset.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset.DiscoveryStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset.DiscoveryStatus)
com.google.cloud.dataplex.v1.Asset.DiscoveryStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.class,
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getUpdateTimeFieldBuilder();
getLastRunTimeFieldBuilder();
getStatsFieldBuilder();
getLastRunDurationFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
message_ = "";
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
lastRunTime_ = null;
if (lastRunTimeBuilder_ != null) {
lastRunTimeBuilder_.dispose();
lastRunTimeBuilder_ = null;
}
stats_ = null;
if (statsBuilder_ != null) {
statsBuilder_.dispose();
statsBuilder_ = null;
}
lastRunDuration_ = null;
if (lastRunDurationBuilder_ != null) {
lastRunDurationBuilder_.dispose();
lastRunDurationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus build() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus buildPartial() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus result =
new com.google.cloud.dataplex.v1.Asset.DiscoveryStatus(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.message_ = message_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.updateTime_ =
updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.lastRunTime_ =
lastRunTimeBuilder_ == null ? lastRunTime_ : lastRunTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.lastRunDuration_ =
lastRunDurationBuilder_ == null ? lastRunDuration_ : lastRunDurationBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataplex.v1.Asset.DiscoveryStatus) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset.DiscoveryStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus other) {
if (other == com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (other.hasLastRunTime()) {
mergeLastRunTime(other.getLastRunTime());
}
if (other.hasStats()) {
mergeStats(other.getStats());
}
if (other.hasLastRunDuration()) {
mergeLastRunDuration(other.getLastRunDuration());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getLastRunTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 50:
{
input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 50
case 58:
{
input.readMessage(
getLastRunDurationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 58
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State getState() {
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State result =
com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.forNumber(state_);
return result == null
? com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The current status of the discovery feature.
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000001);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
*
*
* Additional information about the current state.
*
*
* .google.protobuf.Duration last_run_duration = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getLastRunDurationFieldBuilder() {
if (lastRunDurationBuilder_ == null) {
lastRunDurationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getLastRunDuration(), getParentForChildren(), isClean());
lastRunDuration_ = null;
}
return lastRunDurationBuilder_;
}
@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.Asset.DiscoveryStatus)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Asset.DiscoveryStatus)
private static final com.google.cloud.dataplex.v1.Asset.DiscoveryStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Asset.DiscoveryStatus();
}
public static com.google.cloud.dataplex.v1.Asset.DiscoveryStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DiscoveryStatus 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.Asset.DiscoveryStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
*
*
* @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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
*
* string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @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 UID_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object uid_ = "";
/**
*
*
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
*
* string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for uid.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATE_TIME_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. The time when the asset was created.
*
*
* .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. The time when the asset was created.
*
*
* string description = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 8;
private int state_ = 0;
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.State getState() {
com.google.cloud.dataplex.v1.State result =
com.google.cloud.dataplex.v1.State.forNumber(state_);
return result == null ? com.google.cloud.dataplex.v1.State.UNRECOGNIZED : result;
}
public static final int RESOURCE_SPEC_FIELD_NUMBER = 100;
private com.google.cloud.dataplex.v1.Asset.ResourceSpec resourceSpec_;
/**
*
*
*
* Required. Specification of the resource that is referenced by this asset.
*
*
*
* .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the resourceSpec field is set.
*/
@java.lang.Override
public boolean hasResourceSpec() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Required. Specification of the resource that is referenced by this asset.
*
* Output only. Status of the security policy applied to resource referenced
* by this asset.
*
*
*
* .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.SecurityStatusOrBuilder getSecurityStatusOrBuilder() {
return securityStatus_ == null
? com.google.cloud.dataplex.v1.Asset.SecurityStatus.getDefaultInstance()
: securityStatus_;
}
public static final int DISCOVERY_SPEC_FIELD_NUMBER = 106;
private com.google.cloud.dataplex.v1.Asset.DiscoverySpec discoverySpec_;
/**
*
*
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the discoverySpec field is set.
*/
@java.lang.Override
public boolean hasDiscoverySpec() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoverySpecOrBuilder getDiscoverySpecOrBuilder() {
return discoverySpec_ == null
? com.google.cloud.dataplex.v1.Asset.DiscoverySpec.getDefaultInstance()
: discoverySpec_;
}
public static final int DISCOVERY_STATUS_FIELD_NUMBER = 107;
private com.google.cloud.dataplex.v1.Asset.DiscoveryStatus discoveryStatus_;
/**
*
*
*
* Output only. Status of the discovery feature applied to data referenced by
* this asset.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the discoveryStatus field is set.
*/
@java.lang.Override
public boolean hasDiscoveryStatus() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Output only. Status of the discovery feature applied to data referenced by
* this asset.
*
* Output only. Status of the discovery feature applied to data referenced by
* this asset.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset.DiscoveryStatusOrBuilder getDiscoveryStatusOrBuilder() {
return discoveryStatus_ == null
? com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.getDefaultInstance()
: discoveryStatus_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uid_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getUpdateTime());
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_);
}
if (state_ != com.google.cloud.dataplex.v1.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(8, state_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(100, getResourceSpec());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(101, getResourceStatus());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(103, getSecurityStatus());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(106, getDiscoverySpec());
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(107, getDiscoveryStatus());
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uid_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, 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(6, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_);
}
if (state_ != com.google.cloud.dataplex.v1.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(100, getResourceSpec());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(101, getResourceStatus());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(103, getSecurityStatus());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(106, getDiscoverySpec());
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(107, getDiscoveryStatus());
}
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.Asset)) {
return super.equals(obj);
}
com.google.cloud.dataplex.v1.Asset other = (com.google.cloud.dataplex.v1.Asset) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getUid().equals(other.getUid())) 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 (!getDescription().equals(other.getDescription())) return false;
if (state_ != other.state_) return false;
if (hasResourceSpec() != other.hasResourceSpec()) return false;
if (hasResourceSpec()) {
if (!getResourceSpec().equals(other.getResourceSpec())) return false;
}
if (hasResourceStatus() != other.hasResourceStatus()) return false;
if (hasResourceStatus()) {
if (!getResourceStatus().equals(other.getResourceStatus())) return false;
}
if (hasSecurityStatus() != other.hasSecurityStatus()) return false;
if (hasSecurityStatus()) {
if (!getSecurityStatus().equals(other.getSecurityStatus())) return false;
}
if (hasDiscoverySpec() != other.hasDiscoverySpec()) return false;
if (hasDiscoverySpec()) {
if (!getDiscoverySpec().equals(other.getDiscoverySpec())) return false;
}
if (hasDiscoveryStatus() != other.hasDiscoveryStatus()) return false;
if (hasDiscoveryStatus()) {
if (!getDiscoveryStatus().equals(other.getDiscoveryStatus())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid().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) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
if (hasResourceSpec()) {
hash = (37 * hash) + RESOURCE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getResourceSpec().hashCode();
}
if (hasResourceStatus()) {
hash = (37 * hash) + RESOURCE_STATUS_FIELD_NUMBER;
hash = (53 * hash) + getResourceStatus().hashCode();
}
if (hasSecurityStatus()) {
hash = (37 * hash) + SECURITY_STATUS_FIELD_NUMBER;
hash = (53 * hash) + getSecurityStatus().hashCode();
}
if (hasDiscoverySpec()) {
hash = (37 * hash) + DISCOVERY_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getDiscoverySpec().hashCode();
}
if (hasDiscoveryStatus()) {
hash = (37 * hash) + DISCOVERY_STATUS_FIELD_NUMBER;
hash = (53 * hash) + getDiscoveryStatus().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataplex.v1.Asset parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset 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.Asset parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset 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.Asset parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.Asset 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.Asset parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset 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.Asset parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.Asset 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.Asset 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.Asset 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.Asset 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;
}
/**
*
*
*
* An asset represents a cloud resource that is being managed within a lake as a
* member of a zone.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.Asset}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Asset)
com.google.cloud.dataplex.v1.AssetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 6:
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.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.Asset.class,
com.google.cloud.dataplex.v1.Asset.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.Asset.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
getResourceSpecFieldBuilder();
getResourceStatusFieldBuilder();
getSecurityStatusFieldBuilder();
getDiscoverySpecFieldBuilder();
getDiscoveryStatusFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
uid_ = "";
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
internalGetMutableLabels().clear();
description_ = "";
state_ = 0;
resourceSpec_ = null;
if (resourceSpecBuilder_ != null) {
resourceSpecBuilder_.dispose();
resourceSpecBuilder_ = null;
}
resourceStatus_ = null;
if (resourceStatusBuilder_ != null) {
resourceStatusBuilder_.dispose();
resourceStatusBuilder_ = null;
}
securityStatus_ = null;
if (securityStatusBuilder_ != null) {
securityStatusBuilder_.dispose();
securityStatusBuilder_ = null;
}
discoverySpec_ = null;
if (discoverySpecBuilder_ != null) {
discoverySpecBuilder_.dispose();
discoverySpecBuilder_ = null;
}
discoveryStatus_ = null;
if (discoveryStatusBuilder_ != null) {
discoveryStatusBuilder_.dispose();
discoveryStatusBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.ResourcesProto
.internal_static_google_cloud_dataplex_v1_Asset_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.Asset.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset build() {
com.google.cloud.dataplex.v1.Asset result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.Asset buildPartial() {
com.google.cloud.dataplex.v1.Asset result = new com.google.cloud.dataplex.v1.Asset(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.Asset result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.uid_ = uid_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.resourceSpec_ =
resourceSpecBuilder_ == null ? resourceSpec_ : resourceSpecBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.resourceStatus_ =
resourceStatusBuilder_ == null ? resourceStatus_ : resourceStatusBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.securityStatus_ =
securityStatusBuilder_ == null ? securityStatus_ : securityStatusBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.discoverySpec_ =
discoverySpecBuilder_ == null ? discoverySpec_ : discoverySpecBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.discoveryStatus_ =
discoveryStatusBuilder_ == null ? discoveryStatus_ : discoveryStatusBuilder_.build();
to_bitField0_ |= 0x00000040;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataplex.v1.Asset) {
return mergeFrom((com.google.cloud.dataplex.v1.Asset) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset other) {
if (other == com.google.cloud.dataplex.v1.Asset.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getUid().isEmpty()) {
uid_ = other.uid_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000020;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (other.hasResourceSpec()) {
mergeResourceSpec(other.getResourceSpec());
}
if (other.hasResourceStatus()) {
mergeResourceStatus(other.getResourceStatus());
}
if (other.hasSecurityStatus()) {
mergeSecurityStatus(other.getSecurityStatus());
}
if (other.hasDiscoverySpec()) {
mergeDiscoverySpec(other.getDiscoverySpec());
}
if (other.hasDiscoveryStatus()) {
mergeDiscoveryStatus(other.getDiscoveryStatus());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
uid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
case 64:
{
state_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 64
case 802:
{
input.readMessage(getResourceSpecFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 802
case 810:
{
input.readMessage(getResourceStatusFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 810
case 826:
{
input.readMessage(getSecurityStatusFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000400;
break;
} // case 826
case 850:
{
input.readMessage(getDiscoverySpecFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000800;
break;
} // case 850
case 858:
{
input.readMessage(getDiscoveryStatusFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 858
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
*
*
* @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 relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
*
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
* Output only. The relative resource name of the asset, of the form:
* `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
*
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
*
* string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @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;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object uid_ = "";
/**
*
*
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
*
* string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uid_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
* Output only. System generated globally unique ID for the asset. This ID
* will be different if the asset is deleted and re-created with the same
* name.
*
*
* string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for uid to set.
* @return This builder for chaining.
*/
public Builder setUidBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uid_ = value;
bitField0_ |= 0x00000004;
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 time when the asset was created.
*
*
*
* .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. The time when the asset was created.
*
*
* string description = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private int state_ = 0;
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.State getState() {
com.google.cloud.dataplex.v1.State result =
com.google.cloud.dataplex.v1.State.forNumber(state_);
return result == null ? com.google.cloud.dataplex.v1.State.UNRECOGNIZED : result;
}
/**
*
*
*
* Output only. Current state of the asset.
*
*
* .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.dataplex.v1.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
*
*
* .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the discoverySpec field is set.
*/
public boolean hasDiscoverySpec() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*
* Optional. Specification of the discovery feature applied to data referenced
* by this asset. When this spec is left unset, the asset will use the spec
* set on the parent zone.
*