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

com.google.cloud.visionai.v1.SchemaKeySortingStrategy 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/visionai/v1/warehouse.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;

/**
 *
 *
 * 
 * A strategy to specify how to sort by data schema key.
 * 
* * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy} */ public final class SchemaKeySortingStrategy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy) SchemaKeySortingStrategyOrBuilder { private static final long serialVersionUID = 0L; // Use SchemaKeySortingStrategy.newBuilder() to construct. private SchemaKeySortingStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SchemaKeySortingStrategy() { options_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SchemaKeySortingStrategy(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.SchemaKeySortingStrategy.class, com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder.class); } public interface OptionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) com.google.protobuf.MessageOrBuilder { /** * * *
     * The data used to sort.
     * 
* * string data_schema_key = 1; * * @return The dataSchemaKey. */ java.lang.String getDataSchemaKey(); /** * * *
     * The data used to sort.
     * 
* * string data_schema_key = 1; * * @return The bytes for dataSchemaKey. */ com.google.protobuf.ByteString getDataSchemaKeyBytes(); /** * * *
     * Whether to sort in decreasing order or increasing order.
     * By default, results are sorted in incresing order.
     * 
* * bool sort_decreasing = 2; * * @return The sortDecreasing. */ boolean getSortDecreasing(); /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return Whether the aggregateMethod field is set. */ boolean hasAggregateMethod(); /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The enum numeric value on the wire for aggregateMethod. */ int getAggregateMethodValue(); /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The aggregateMethod. */ com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod getAggregateMethod(); } /** * * *
   * Option for one data schema key.
   * 
* * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy.Option} */ public static final class Option extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) OptionOrBuilder { private static final long serialVersionUID = 0L; // Use Option.newBuilder() to construct. private Option(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Option() { dataSchemaKey_ = ""; aggregateMethod_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Option(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.class, com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.Builder.class); } /** * * *
     * When one result has multiple values with the same key, specify
     * which value is used to sort. By default, AGGREGATE_METHOD_LARGEST
     * is used when results are sorted in decreasing order,
     * AGGREGATE_METHOD_SMALLEST is used when results are sorted in
     * incresing order.
     * 
* * Protobuf enum {@code * google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod} */ public enum AggregateMethod implements com.google.protobuf.ProtocolMessageEnum { /** * * *
       * The unspecified aggregate method will be overwritten as mentioned
       * above.
       * 
* * AGGREGATE_METHOD_UNSPECIFIED = 0; */ AGGREGATE_METHOD_UNSPECIFIED(0), /** * * *
       * Take the (lexicographical or numerical) largest value to sort.
       * 
* * AGGREGATE_METHOD_LARGEST = 1; */ AGGREGATE_METHOD_LARGEST(1), /** * * *
       * Take the (lexicographical or numerical) smallest value to sort.
       * 
* * AGGREGATE_METHOD_SMALLEST = 2; */ AGGREGATE_METHOD_SMALLEST(2), UNRECOGNIZED(-1), ; /** * * *
       * The unspecified aggregate method will be overwritten as mentioned
       * above.
       * 
* * AGGREGATE_METHOD_UNSPECIFIED = 0; */ public static final int AGGREGATE_METHOD_UNSPECIFIED_VALUE = 0; /** * * *
       * Take the (lexicographical or numerical) largest value to sort.
       * 
* * AGGREGATE_METHOD_LARGEST = 1; */ public static final int AGGREGATE_METHOD_LARGEST_VALUE = 1; /** * * *
       * Take the (lexicographical or numerical) smallest value to sort.
       * 
* * AGGREGATE_METHOD_SMALLEST = 2; */ public static final int AGGREGATE_METHOD_SMALLEST_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 AggregateMethod 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 AggregateMethod forNumber(int value) { switch (value) { case 0: return AGGREGATE_METHOD_UNSPECIFIED; case 1: return AGGREGATE_METHOD_LARGEST; case 2: return AGGREGATE_METHOD_SMALLEST; 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 AggregateMethod findValueByNumber(int number) { return AggregateMethod.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.visionai.v1.SchemaKeySortingStrategy.Option.getDescriptor() .getEnumTypes() .get(0); } private static final AggregateMethod[] VALUES = values(); public static AggregateMethod 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 AggregateMethod(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod) } private int bitField0_; public static final int DATA_SCHEMA_KEY_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object dataSchemaKey_ = ""; /** * * *
     * The data used to sort.
     * 
* * string data_schema_key = 1; * * @return The dataSchemaKey. */ @java.lang.Override public java.lang.String getDataSchemaKey() { java.lang.Object ref = dataSchemaKey_; 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(); dataSchemaKey_ = s; return s; } } /** * * *
     * The data used to sort.
     * 
* * string data_schema_key = 1; * * @return The bytes for dataSchemaKey. */ @java.lang.Override public com.google.protobuf.ByteString getDataSchemaKeyBytes() { java.lang.Object ref = dataSchemaKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); dataSchemaKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SORT_DECREASING_FIELD_NUMBER = 2; private boolean sortDecreasing_ = false; /** * * *
     * Whether to sort in decreasing order or increasing order.
     * By default, results are sorted in incresing order.
     * 
* * bool sort_decreasing = 2; * * @return The sortDecreasing. */ @java.lang.Override public boolean getSortDecreasing() { return sortDecreasing_; } public static final int AGGREGATE_METHOD_FIELD_NUMBER = 3; private int aggregateMethod_ = 0; /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return Whether the aggregateMethod field is set. */ @java.lang.Override public boolean hasAggregateMethod() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The enum numeric value on the wire for aggregateMethod. */ @java.lang.Override public int getAggregateMethodValue() { return aggregateMethod_; } /** * * *
     * Aggregate method for the current data schema key.
     * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The aggregateMethod. */ @java.lang.Override public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod getAggregateMethod() { com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod result = com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod.forNumber( aggregateMethod_); return result == null ? com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod .UNRECOGNIZED : result; } 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(dataSchemaKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataSchemaKey_); } if (sortDecreasing_ != false) { output.writeBool(2, sortDecreasing_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeEnum(3, aggregateMethod_); } 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(dataSchemaKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataSchemaKey_); } if (sortDecreasing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, sortDecreasing_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, aggregateMethod_); } 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.visionai.v1.SchemaKeySortingStrategy.Option)) { return super.equals(obj); } com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option other = (com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) obj; if (!getDataSchemaKey().equals(other.getDataSchemaKey())) return false; if (getSortDecreasing() != other.getSortDecreasing()) return false; if (hasAggregateMethod() != other.hasAggregateMethod()) return false; if (hasAggregateMethod()) { if (aggregateMethod_ != other.aggregateMethod_) 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) + DATA_SCHEMA_KEY_FIELD_NUMBER; hash = (53 * hash) + getDataSchemaKey().hashCode(); hash = (37 * hash) + SORT_DECREASING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSortDecreasing()); if (hasAggregateMethod()) { hash = (37 * hash) + AGGREGATE_METHOD_FIELD_NUMBER; hash = (53 * hash) + aggregateMethod_; } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option 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; } /** * * *
     * Option for one data schema key.
     * 
* * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy.Option} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) com.google.cloud.visionai.v1.SchemaKeySortingStrategy.OptionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.class, com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.Builder.class); } // Construct using com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; dataSchemaKey_ = ""; sortDecreasing_ = false; aggregateMethod_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.visionai.v1.WarehouseProto .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option getDefaultInstanceForType() { return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option build() { com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option buildPartial() { com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result = new com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.dataSchemaKey_ = dataSchemaKey_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.sortDecreasing_ = sortDecreasing_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.aggregateMethod_ = aggregateMethod_; 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.visionai.v1.SchemaKeySortingStrategy.Option) { return mergeFrom((com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option other) { if (other == com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.getDefaultInstance()) return this; if (!other.getDataSchemaKey().isEmpty()) { dataSchemaKey_ = other.dataSchemaKey_; bitField0_ |= 0x00000001; onChanged(); } if (other.getSortDecreasing() != false) { setSortDecreasing(other.getSortDecreasing()); } if (other.hasAggregateMethod()) { setAggregateMethod(other.getAggregateMethod()); } 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: { dataSchemaKey_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { sortDecreasing_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { aggregateMethod_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 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 dataSchemaKey_ = ""; /** * * *
       * The data used to sort.
       * 
* * string data_schema_key = 1; * * @return The dataSchemaKey. */ public java.lang.String getDataSchemaKey() { java.lang.Object ref = dataSchemaKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); dataSchemaKey_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The data used to sort.
       * 
* * string data_schema_key = 1; * * @return The bytes for dataSchemaKey. */ public com.google.protobuf.ByteString getDataSchemaKeyBytes() { java.lang.Object ref = dataSchemaKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); dataSchemaKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The data used to sort.
       * 
* * string data_schema_key = 1; * * @param value The dataSchemaKey to set. * @return This builder for chaining. */ public Builder setDataSchemaKey(java.lang.String value) { if (value == null) { throw new NullPointerException(); } dataSchemaKey_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The data used to sort.
       * 
* * string data_schema_key = 1; * * @return This builder for chaining. */ public Builder clearDataSchemaKey() { dataSchemaKey_ = getDefaultInstance().getDataSchemaKey(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * The data used to sort.
       * 
* * string data_schema_key = 1; * * @param value The bytes for dataSchemaKey to set. * @return This builder for chaining. */ public Builder setDataSchemaKeyBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); dataSchemaKey_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private boolean sortDecreasing_; /** * * *
       * Whether to sort in decreasing order or increasing order.
       * By default, results are sorted in incresing order.
       * 
* * bool sort_decreasing = 2; * * @return The sortDecreasing. */ @java.lang.Override public boolean getSortDecreasing() { return sortDecreasing_; } /** * * *
       * Whether to sort in decreasing order or increasing order.
       * By default, results are sorted in incresing order.
       * 
* * bool sort_decreasing = 2; * * @param value The sortDecreasing to set. * @return This builder for chaining. */ public Builder setSortDecreasing(boolean value) { sortDecreasing_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Whether to sort in decreasing order or increasing order.
       * By default, results are sorted in incresing order.
       * 
* * bool sort_decreasing = 2; * * @return This builder for chaining. */ public Builder clearSortDecreasing() { bitField0_ = (bitField0_ & ~0x00000002); sortDecreasing_ = false; onChanged(); return this; } private int aggregateMethod_ = 0; /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return Whether the aggregateMethod field is set. */ @java.lang.Override public boolean hasAggregateMethod() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The enum numeric value on the wire for aggregateMethod. */ @java.lang.Override public int getAggregateMethodValue() { return aggregateMethod_; } /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @param value The enum numeric value on the wire for aggregateMethod to set. * @return This builder for chaining. */ public Builder setAggregateMethodValue(int value) { aggregateMethod_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return The aggregateMethod. */ @java.lang.Override public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod getAggregateMethod() { com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod result = com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod.forNumber( aggregateMethod_); return result == null ? com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod .UNRECOGNIZED : result; } /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @param value The aggregateMethod to set. * @return This builder for chaining. */ public Builder setAggregateMethod( com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; aggregateMethod_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Aggregate method for the current data schema key.
       * 
* * * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; * * * @return This builder for chaining. */ public Builder clearAggregateMethod() { bitField0_ = (bitField0_ & ~0x00000004); aggregateMethod_ = 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.visionai.v1.SchemaKeySortingStrategy.Option) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) private static final com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option(); } public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser




© 2015 - 2025 Weber Informatics LLC | Privacy Policy