com.google.cloud.dataplex.v1.DataQualityRuleResult Maven / Gradle / Ivy
/*
* 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/data_quality.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.dataplex.v1;
/**
*
*
*
* DataQualityRuleResult provides a more detailed, per-rule view of the results.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.DataQualityRuleResult}
*/
public final class DataQualityRuleResult extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualityRuleResult)
DataQualityRuleResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataQualityRuleResult.newBuilder() to construct.
private DataQualityRuleResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataQualityRuleResult() {
failingRowsQuery_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new DataQualityRuleResult();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.DataQualityProto
.internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.DataQualityProto
.internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.DataQualityRuleResult.class,
com.google.cloud.dataplex.v1.DataQualityRuleResult.Builder.class);
}
private int bitField0_;
public static final int RULE_FIELD_NUMBER = 1;
private com.google.cloud.dataplex.v1.DataQualityRule rule_;
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*
* @return Whether the rule field is set.
*/
@java.lang.Override
public boolean hasRule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*
* @return The rule.
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.DataQualityRule getRule() {
return rule_ == null
? com.google.cloud.dataplex.v1.DataQualityRule.getDefaultInstance()
: rule_;
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
@java.lang.Override
public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRuleOrBuilder() {
return rule_ == null
? com.google.cloud.dataplex.v1.DataQualityRule.getDefaultInstance()
: rule_;
}
public static final int PASSED_FIELD_NUMBER = 7;
private boolean passed_ = false;
/**
*
*
*
* Whether the rule passed or failed.
*
*
* bool passed = 7;
*
* @return The passed.
*/
@java.lang.Override
public boolean getPassed() {
return passed_;
}
public static final int EVALUATED_COUNT_FIELD_NUMBER = 9;
private long evaluatedCount_ = 0L;
/**
*
*
*
* The number of rows a rule was evaluated against.
*
* This field is only valid for row-level type rules.
*
* Evaluated count can be configured to either
*
* * include all rows (default) - with `null` rows automatically failing rule
* evaluation, or
* * exclude `null` rows from the `evaluated_count`, by setting
* `ignore_nulls = true`.
*
*
* int64 evaluated_count = 9;
*
* @return The evaluatedCount.
*/
@java.lang.Override
public long getEvaluatedCount() {
return evaluatedCount_;
}
public static final int PASSED_COUNT_FIELD_NUMBER = 8;
private long passedCount_ = 0L;
/**
*
*
*
* The number of rows which passed a rule evaluation.
*
* This field is only valid for row-level type rules.
*
*
* int64 passed_count = 8;
*
* @return The passedCount.
*/
@java.lang.Override
public long getPassedCount() {
return passedCount_;
}
public static final int NULL_COUNT_FIELD_NUMBER = 5;
private long nullCount_ = 0L;
/**
*
*
*
* The number of rows with null values in the specified column.
*
*
* int64 null_count = 5;
*
* @return The nullCount.
*/
@java.lang.Override
public long getNullCount() {
return nullCount_;
}
public static final int PASS_RATIO_FIELD_NUMBER = 6;
private double passRatio_ = 0D;
/**
*
*
*
* The ratio of **passed_count / evaluated_count**.
*
* This field is only valid for row-level type rules.
*
*
* double pass_ratio = 6;
*
* @return The passRatio.
*/
@java.lang.Override
public double getPassRatio() {
return passRatio_;
}
public static final int FAILING_ROWS_QUERY_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private volatile java.lang.Object failingRowsQuery_ = "";
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @return The failingRowsQuery.
*/
@java.lang.Override
public java.lang.String getFailingRowsQuery() {
java.lang.Object ref = failingRowsQuery_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
failingRowsQuery_ = s;
return s;
}
}
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @return The bytes for failingRowsQuery.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFailingRowsQueryBytes() {
java.lang.Object ref = failingRowsQuery_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
failingRowsQuery_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ASSERTION_ROW_COUNT_FIELD_NUMBER = 11;
private long assertionRowCount_ = 0L;
/**
*
*
*
* Output only. The number of rows returned by the sql statement in the
* SqlAssertion rule.
*
* This field is only valid for SqlAssertion rules.
*
*
* int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The assertionRowCount.
*/
@java.lang.Override
public long getAssertionRowCount() {
return assertionRowCount_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getRule());
}
if (nullCount_ != 0L) {
output.writeInt64(5, nullCount_);
}
if (java.lang.Double.doubleToRawLongBits(passRatio_) != 0) {
output.writeDouble(6, passRatio_);
}
if (passed_ != false) {
output.writeBool(7, passed_);
}
if (passedCount_ != 0L) {
output.writeInt64(8, passedCount_);
}
if (evaluatedCount_ != 0L) {
output.writeInt64(9, evaluatedCount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failingRowsQuery_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, failingRowsQuery_);
}
if (assertionRowCount_ != 0L) {
output.writeInt64(11, assertionRowCount_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRule());
}
if (nullCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, nullCount_);
}
if (java.lang.Double.doubleToRawLongBits(passRatio_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, passRatio_);
}
if (passed_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, passed_);
}
if (passedCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, passedCount_);
}
if (evaluatedCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, evaluatedCount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failingRowsQuery_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, failingRowsQuery_);
}
if (assertionRowCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, assertionRowCount_);
}
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.DataQualityRuleResult)) {
return super.equals(obj);
}
com.google.cloud.dataplex.v1.DataQualityRuleResult other =
(com.google.cloud.dataplex.v1.DataQualityRuleResult) obj;
if (hasRule() != other.hasRule()) return false;
if (hasRule()) {
if (!getRule().equals(other.getRule())) return false;
}
if (getPassed() != other.getPassed()) return false;
if (getEvaluatedCount() != other.getEvaluatedCount()) return false;
if (getPassedCount() != other.getPassedCount()) return false;
if (getNullCount() != other.getNullCount()) return false;
if (java.lang.Double.doubleToLongBits(getPassRatio())
!= java.lang.Double.doubleToLongBits(other.getPassRatio())) return false;
if (!getFailingRowsQuery().equals(other.getFailingRowsQuery())) return false;
if (getAssertionRowCount() != other.getAssertionRowCount()) 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();
if (hasRule()) {
hash = (37 * hash) + RULE_FIELD_NUMBER;
hash = (53 * hash) + getRule().hashCode();
}
hash = (37 * hash) + PASSED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPassed());
hash = (37 * hash) + EVALUATED_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEvaluatedCount());
hash = (37 * hash) + PASSED_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPassedCount());
hash = (37 * hash) + NULL_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNullCount());
hash = (37 * hash) + PASS_RATIO_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getPassRatio()));
hash = (37 * hash) + FAILING_ROWS_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getFailingRowsQuery().hashCode();
hash = (37 * hash) + ASSERTION_ROW_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAssertionRowCount());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult 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.DataQualityRuleResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult 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.DataQualityRuleResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult 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.DataQualityRuleResult parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult 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.DataQualityRuleResult parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult 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.DataQualityRuleResult 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.DataQualityRuleResult 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.DataQualityRuleResult 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;
}
/**
*
*
*
* DataQualityRuleResult provides a more detailed, per-rule view of the results.
*
*
* Protobuf type {@code google.cloud.dataplex.v1.DataQualityRuleResult}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualityRuleResult)
com.google.cloud.dataplex.v1.DataQualityRuleResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataplex.v1.DataQualityProto
.internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataplex.v1.DataQualityProto
.internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataplex.v1.DataQualityRuleResult.class,
com.google.cloud.dataplex.v1.DataQualityRuleResult.Builder.class);
}
// Construct using com.google.cloud.dataplex.v1.DataQualityRuleResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getRuleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
rule_ = null;
if (ruleBuilder_ != null) {
ruleBuilder_.dispose();
ruleBuilder_ = null;
}
passed_ = false;
evaluatedCount_ = 0L;
passedCount_ = 0L;
nullCount_ = 0L;
passRatio_ = 0D;
failingRowsQuery_ = "";
assertionRowCount_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataplex.v1.DataQualityProto
.internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_descriptor;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.DataQualityRuleResult getDefaultInstanceForType() {
return com.google.cloud.dataplex.v1.DataQualityRuleResult.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataplex.v1.DataQualityRuleResult build() {
com.google.cloud.dataplex.v1.DataQualityRuleResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataplex.v1.DataQualityRuleResult buildPartial() {
com.google.cloud.dataplex.v1.DataQualityRuleResult result =
new com.google.cloud.dataplex.v1.DataQualityRuleResult(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dataplex.v1.DataQualityRuleResult result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.rule_ = ruleBuilder_ == null ? rule_ : ruleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.passed_ = passed_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.evaluatedCount_ = evaluatedCount_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.passedCount_ = passedCount_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.nullCount_ = nullCount_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.passRatio_ = passRatio_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.failingRowsQuery_ = failingRowsQuery_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.assertionRowCount_ = assertionRowCount_;
}
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.DataQualityRuleResult) {
return mergeFrom((com.google.cloud.dataplex.v1.DataQualityRuleResult) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualityRuleResult other) {
if (other == com.google.cloud.dataplex.v1.DataQualityRuleResult.getDefaultInstance())
return this;
if (other.hasRule()) {
mergeRule(other.getRule());
}
if (other.getPassed() != false) {
setPassed(other.getPassed());
}
if (other.getEvaluatedCount() != 0L) {
setEvaluatedCount(other.getEvaluatedCount());
}
if (other.getPassedCount() != 0L) {
setPassedCount(other.getPassedCount());
}
if (other.getNullCount() != 0L) {
setNullCount(other.getNullCount());
}
if (other.getPassRatio() != 0D) {
setPassRatio(other.getPassRatio());
}
if (!other.getFailingRowsQuery().isEmpty()) {
failingRowsQuery_ = other.failingRowsQuery_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.getAssertionRowCount() != 0L) {
setAssertionRowCount(other.getAssertionRowCount());
}
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:
{
input.readMessage(getRuleFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 40:
{
nullCount_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 49:
{
passRatio_ = input.readDouble();
bitField0_ |= 0x00000020;
break;
} // case 49
case 56:
{
passed_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 56
case 64:
{
passedCount_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 64
case 72:
{
evaluatedCount_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 72
case 82:
{
failingRowsQuery_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 82
case 88:
{
assertionRowCount_ = input.readInt64();
bitField0_ |= 0x00000080;
break;
} // case 88
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 com.google.cloud.dataplex.v1.DataQualityRule rule_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataplex.v1.DataQualityRule,
com.google.cloud.dataplex.v1.DataQualityRule.Builder,
com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder>
ruleBuilder_;
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*
* @return Whether the rule field is set.
*/
public boolean hasRule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*
* @return The rule.
*/
public com.google.cloud.dataplex.v1.DataQualityRule getRule() {
if (ruleBuilder_ == null) {
return rule_ == null
? com.google.cloud.dataplex.v1.DataQualityRule.getDefaultInstance()
: rule_;
} else {
return ruleBuilder_.getMessage();
}
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public Builder setRule(com.google.cloud.dataplex.v1.DataQualityRule value) {
if (ruleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rule_ = value;
} else {
ruleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public Builder setRule(com.google.cloud.dataplex.v1.DataQualityRule.Builder builderForValue) {
if (ruleBuilder_ == null) {
rule_ = builderForValue.build();
} else {
ruleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public Builder mergeRule(com.google.cloud.dataplex.v1.DataQualityRule value) {
if (ruleBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& rule_ != null
&& rule_ != com.google.cloud.dataplex.v1.DataQualityRule.getDefaultInstance()) {
getRuleBuilder().mergeFrom(value);
} else {
rule_ = value;
}
} else {
ruleBuilder_.mergeFrom(value);
}
if (rule_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public Builder clearRule() {
bitField0_ = (bitField0_ & ~0x00000001);
rule_ = null;
if (ruleBuilder_ != null) {
ruleBuilder_.dispose();
ruleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public com.google.cloud.dataplex.v1.DataQualityRule.Builder getRuleBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getRuleFieldBuilder().getBuilder();
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRuleOrBuilder() {
if (ruleBuilder_ != null) {
return ruleBuilder_.getMessageOrBuilder();
} else {
return rule_ == null
? com.google.cloud.dataplex.v1.DataQualityRule.getDefaultInstance()
: rule_;
}
}
/**
*
*
*
* The rule specified in the DataQualitySpec, as is.
*
*
* .google.cloud.dataplex.v1.DataQualityRule rule = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataplex.v1.DataQualityRule,
com.google.cloud.dataplex.v1.DataQualityRule.Builder,
com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder>
getRuleFieldBuilder() {
if (ruleBuilder_ == null) {
ruleBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataplex.v1.DataQualityRule,
com.google.cloud.dataplex.v1.DataQualityRule.Builder,
com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder>(
getRule(), getParentForChildren(), isClean());
rule_ = null;
}
return ruleBuilder_;
}
private boolean passed_;
/**
*
*
*
* Whether the rule passed or failed.
*
*
* bool passed = 7;
*
* @return The passed.
*/
@java.lang.Override
public boolean getPassed() {
return passed_;
}
/**
*
*
*
* Whether the rule passed or failed.
*
*
* bool passed = 7;
*
* @param value The passed to set.
* @return This builder for chaining.
*/
public Builder setPassed(boolean value) {
passed_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Whether the rule passed or failed.
*
*
* bool passed = 7;
*
* @return This builder for chaining.
*/
public Builder clearPassed() {
bitField0_ = (bitField0_ & ~0x00000002);
passed_ = false;
onChanged();
return this;
}
private long evaluatedCount_;
/**
*
*
*
* The number of rows a rule was evaluated against.
*
* This field is only valid for row-level type rules.
*
* Evaluated count can be configured to either
*
* * include all rows (default) - with `null` rows automatically failing rule
* evaluation, or
* * exclude `null` rows from the `evaluated_count`, by setting
* `ignore_nulls = true`.
*
*
* int64 evaluated_count = 9;
*
* @return The evaluatedCount.
*/
@java.lang.Override
public long getEvaluatedCount() {
return evaluatedCount_;
}
/**
*
*
*
* The number of rows a rule was evaluated against.
*
* This field is only valid for row-level type rules.
*
* Evaluated count can be configured to either
*
* * include all rows (default) - with `null` rows automatically failing rule
* evaluation, or
* * exclude `null` rows from the `evaluated_count`, by setting
* `ignore_nulls = true`.
*
*
* int64 evaluated_count = 9;
*
* @param value The evaluatedCount to set.
* @return This builder for chaining.
*/
public Builder setEvaluatedCount(long value) {
evaluatedCount_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The number of rows a rule was evaluated against.
*
* This field is only valid for row-level type rules.
*
* Evaluated count can be configured to either
*
* * include all rows (default) - with `null` rows automatically failing rule
* evaluation, or
* * exclude `null` rows from the `evaluated_count`, by setting
* `ignore_nulls = true`.
*
*
* int64 evaluated_count = 9;
*
* @return This builder for chaining.
*/
public Builder clearEvaluatedCount() {
bitField0_ = (bitField0_ & ~0x00000004);
evaluatedCount_ = 0L;
onChanged();
return this;
}
private long passedCount_;
/**
*
*
*
* The number of rows which passed a rule evaluation.
*
* This field is only valid for row-level type rules.
*
*
* int64 passed_count = 8;
*
* @return The passedCount.
*/
@java.lang.Override
public long getPassedCount() {
return passedCount_;
}
/**
*
*
*
* The number of rows which passed a rule evaluation.
*
* This field is only valid for row-level type rules.
*
*
* int64 passed_count = 8;
*
* @param value The passedCount to set.
* @return This builder for chaining.
*/
public Builder setPassedCount(long value) {
passedCount_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The number of rows which passed a rule evaluation.
*
* This field is only valid for row-level type rules.
*
*
* int64 passed_count = 8;
*
* @return This builder for chaining.
*/
public Builder clearPassedCount() {
bitField0_ = (bitField0_ & ~0x00000008);
passedCount_ = 0L;
onChanged();
return this;
}
private long nullCount_;
/**
*
*
*
* The number of rows with null values in the specified column.
*
*
* int64 null_count = 5;
*
* @return The nullCount.
*/
@java.lang.Override
public long getNullCount() {
return nullCount_;
}
/**
*
*
*
* The number of rows with null values in the specified column.
*
*
* int64 null_count = 5;
*
* @param value The nullCount to set.
* @return This builder for chaining.
*/
public Builder setNullCount(long value) {
nullCount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The number of rows with null values in the specified column.
*
*
* int64 null_count = 5;
*
* @return This builder for chaining.
*/
public Builder clearNullCount() {
bitField0_ = (bitField0_ & ~0x00000010);
nullCount_ = 0L;
onChanged();
return this;
}
private double passRatio_;
/**
*
*
*
* The ratio of **passed_count / evaluated_count**.
*
* This field is only valid for row-level type rules.
*
*
* double pass_ratio = 6;
*
* @return The passRatio.
*/
@java.lang.Override
public double getPassRatio() {
return passRatio_;
}
/**
*
*
*
* The ratio of **passed_count / evaluated_count**.
*
* This field is only valid for row-level type rules.
*
*
* double pass_ratio = 6;
*
* @param value The passRatio to set.
* @return This builder for chaining.
*/
public Builder setPassRatio(double value) {
passRatio_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The ratio of **passed_count / evaluated_count**.
*
* This field is only valid for row-level type rules.
*
*
* double pass_ratio = 6;
*
* @return This builder for chaining.
*/
public Builder clearPassRatio() {
bitField0_ = (bitField0_ & ~0x00000020);
passRatio_ = 0D;
onChanged();
return this;
}
private java.lang.Object failingRowsQuery_ = "";
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @return The failingRowsQuery.
*/
public java.lang.String getFailingRowsQuery() {
java.lang.Object ref = failingRowsQuery_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
failingRowsQuery_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @return The bytes for failingRowsQuery.
*/
public com.google.protobuf.ByteString getFailingRowsQueryBytes() {
java.lang.Object ref = failingRowsQuery_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
failingRowsQuery_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @param value The failingRowsQuery to set.
* @return This builder for chaining.
*/
public Builder setFailingRowsQuery(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
failingRowsQuery_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @return This builder for chaining.
*/
public Builder clearFailingRowsQuery() {
failingRowsQuery_ = getDefaultInstance().getFailingRowsQuery();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* The query to find rows that did not pass this rule.
*
* This field is only valid for row-level type rules.
*
*
* string failing_rows_query = 10;
*
* @param value The bytes for failingRowsQuery to set.
* @return This builder for chaining.
*/
public Builder setFailingRowsQueryBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
failingRowsQuery_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private long assertionRowCount_;
/**
*
*
*
* Output only. The number of rows returned by the sql statement in the
* SqlAssertion rule.
*
* This field is only valid for SqlAssertion rules.
*
*
* int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The assertionRowCount.
*/
@java.lang.Override
public long getAssertionRowCount() {
return assertionRowCount_;
}
/**
*
*
*
* Output only. The number of rows returned by the sql statement in the
* SqlAssertion rule.
*
* This field is only valid for SqlAssertion rules.
*
*
* int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The assertionRowCount to set.
* @return This builder for chaining.
*/
public Builder setAssertionRowCount(long value) {
assertionRowCount_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. The number of rows returned by the sql statement in the
* SqlAssertion rule.
*
* This field is only valid for SqlAssertion rules.
*
*
* int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearAssertionRowCount() {
bitField0_ = (bitField0_ & ~0x00000080);
assertionRowCount_ = 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.DataQualityRuleResult)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualityRuleResult)
private static final com.google.cloud.dataplex.v1.DataQualityRuleResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataQualityRuleResult();
}
public static com.google.cloud.dataplex.v1.DataQualityRuleResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataQualityRuleResult 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.DataQualityRuleResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}