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

com.google.cloud.retail.v2beta.Model Maven / Gradle / Ivy

There is a newer version: 2.57.0
Show newest version
/*
 * 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/retail/v2beta/model.proto

// Protobuf Java Version: 3.25.2
package com.google.cloud.retail.v2beta;

/**
 *
 *
 * 
 * Metadata that describes the training and serving parameters of a
 * [Model][google.cloud.retail.v2beta.Model]. A
 * [Model][google.cloud.retail.v2beta.Model] can be associated with a
 * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and then queried
 * through the Predict API.
 * 
* * Protobuf type {@code google.cloud.retail.v2beta.Model} */ public final class Model extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model) ModelOrBuilder { private static final long serialVersionUID = 0L; // Use Model.newBuilder() to construct. private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Model() { name_ = ""; displayName_ = ""; trainingState_ = 0; servingState_ = 0; type_ = ""; optimizationObjective_ = ""; periodicTuningState_ = 0; tuningOperation_ = ""; dataState_ = 0; filteringOption_ = 0; servingConfigLists_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Model(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.retail.v2beta.Model.class, com.google.cloud.retail.v2beta.Model.Builder.class); } /** * * *
   * The serving state of the model.
   * 
* * Protobuf enum {@code google.cloud.retail.v2beta.Model.ServingState} */ public enum ServingState implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified serving state.
     * 
* * SERVING_STATE_UNSPECIFIED = 0; */ SERVING_STATE_UNSPECIFIED(0), /** * * *
     * The model is not serving.
     * 
* * INACTIVE = 1; */ INACTIVE(1), /** * * *
     * The model is serving and can be queried.
     * 
* * ACTIVE = 2; */ ACTIVE(2), /** * * *
     * The model is trained on tuned hyperparameters and can be
     * queried.
     * 
* * TUNED = 3; */ TUNED(3), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified serving state.
     * 
* * SERVING_STATE_UNSPECIFIED = 0; */ public static final int SERVING_STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The model is not serving.
     * 
* * INACTIVE = 1; */ public static final int INACTIVE_VALUE = 1; /** * * *
     * The model is serving and can be queried.
     * 
* * ACTIVE = 2; */ public static final int ACTIVE_VALUE = 2; /** * * *
     * The model is trained on tuned hyperparameters and can be
     * queried.
     * 
* * TUNED = 3; */ public static final int TUNED_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 ServingState 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 ServingState forNumber(int value) { switch (value) { case 0: return SERVING_STATE_UNSPECIFIED; case 1: return INACTIVE; case 2: return ACTIVE; case 3: return TUNED; 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 ServingState findValueByNumber(int number) { return ServingState.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.retail.v2beta.Model.getDescriptor().getEnumTypes().get(0); } private static final ServingState[] VALUES = values(); public static ServingState 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 ServingState(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.ServingState) } /** * * *
   * The training state of the model.
   * 
* * Protobuf enum {@code google.cloud.retail.v2beta.Model.TrainingState} */ public enum TrainingState implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified training state.
     * 
* * TRAINING_STATE_UNSPECIFIED = 0; */ TRAINING_STATE_UNSPECIFIED(0), /** * * *
     * The model training is paused.
     * 
* * PAUSED = 1; */ PAUSED(1), /** * * *
     * The model is training.
     * 
* * TRAINING = 2; */ TRAINING(2), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified training state.
     * 
* * TRAINING_STATE_UNSPECIFIED = 0; */ public static final int TRAINING_STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The model training is paused.
     * 
* * PAUSED = 1; */ public static final int PAUSED_VALUE = 1; /** * * *
     * The model is training.
     * 
* * TRAINING = 2; */ public static final int TRAINING_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 TrainingState 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 TrainingState forNumber(int value) { switch (value) { case 0: return TRAINING_STATE_UNSPECIFIED; case 1: return PAUSED; case 2: return TRAINING; 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 TrainingState findValueByNumber(int number) { return TrainingState.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.retail.v2beta.Model.getDescriptor().getEnumTypes().get(1); } private static final TrainingState[] VALUES = values(); public static TrainingState 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 TrainingState(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.TrainingState) } /** * * *
   * Describes whether periodic tuning is enabled for this model
   * or not. Periodic tuning is scheduled at most every three months. You can
   * start a tuning process manually by using the `TuneModel`
   * method, which starts a tuning process immediately and resets the quarterly
   * schedule. Enabling or disabling periodic tuning does not affect any
   * current tuning processes.
   * 
* * Protobuf enum {@code google.cloud.retail.v2beta.Model.PeriodicTuningState} */ public enum PeriodicTuningState implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified default value, should never be explicitly set.
     * 
* * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; */ PERIODIC_TUNING_STATE_UNSPECIFIED(0), /** * * *
     * The model has periodic tuning disabled. Tuning
     * can be reenabled by calling the `EnableModelPeriodicTuning`
     * method or by calling the `TuneModel` method.
     * 
* * PERIODIC_TUNING_DISABLED = 1; */ PERIODIC_TUNING_DISABLED(1), /** * * *
     * The model cannot be tuned with periodic tuning OR the
     * `TuneModel` method. Hide the options in customer UI and
     * reject any requests through the backend self serve API.
     * 
* * ALL_TUNING_DISABLED = 3; */ ALL_TUNING_DISABLED(3), /** * * *
     * The model has periodic tuning enabled. Tuning
     * can be disabled by calling the `DisableModelPeriodicTuning`
     * method.
     * 
* * PERIODIC_TUNING_ENABLED = 2; */ PERIODIC_TUNING_ENABLED(2), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified default value, should never be explicitly set.
     * 
* * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; */ public static final int PERIODIC_TUNING_STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The model has periodic tuning disabled. Tuning
     * can be reenabled by calling the `EnableModelPeriodicTuning`
     * method or by calling the `TuneModel` method.
     * 
* * PERIODIC_TUNING_DISABLED = 1; */ public static final int PERIODIC_TUNING_DISABLED_VALUE = 1; /** * * *
     * The model cannot be tuned with periodic tuning OR the
     * `TuneModel` method. Hide the options in customer UI and
     * reject any requests through the backend self serve API.
     * 
* * ALL_TUNING_DISABLED = 3; */ public static final int ALL_TUNING_DISABLED_VALUE = 3; /** * * *
     * The model has periodic tuning enabled. Tuning
     * can be disabled by calling the `DisableModelPeriodicTuning`
     * method.
     * 
* * PERIODIC_TUNING_ENABLED = 2; */ public static final int PERIODIC_TUNING_ENABLED_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 PeriodicTuningState 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 PeriodicTuningState forNumber(int value) { switch (value) { case 0: return PERIODIC_TUNING_STATE_UNSPECIFIED; case 1: return PERIODIC_TUNING_DISABLED; case 3: return ALL_TUNING_DISABLED; case 2: return PERIODIC_TUNING_ENABLED; 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 PeriodicTuningState findValueByNumber(int number) { return PeriodicTuningState.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.retail.v2beta.Model.getDescriptor().getEnumTypes().get(2); } private static final PeriodicTuningState[] VALUES = values(); public static PeriodicTuningState 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 PeriodicTuningState(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.PeriodicTuningState) } /** * * *
   * Describes whether this model have sufficient training data
   * to be continuously trained.
   * 
* * Protobuf enum {@code google.cloud.retail.v2beta.Model.DataState} */ public enum DataState implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified default value, should never be explicitly set.
     * 
* * DATA_STATE_UNSPECIFIED = 0; */ DATA_STATE_UNSPECIFIED(0), /** * * *
     * The model has sufficient training data.
     * 
* * DATA_OK = 1; */ DATA_OK(1), /** * * *
     * The model does not have sufficient training data. Error
     * messages can be queried via Stackdriver.
     * 
* * DATA_ERROR = 2; */ DATA_ERROR(2), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified default value, should never be explicitly set.
     * 
* * DATA_STATE_UNSPECIFIED = 0; */ public static final int DATA_STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The model has sufficient training data.
     * 
* * DATA_OK = 1; */ public static final int DATA_OK_VALUE = 1; /** * * *
     * The model does not have sufficient training data. Error
     * messages can be queried via Stackdriver.
     * 
* * DATA_ERROR = 2; */ public static final int DATA_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 DataState 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 DataState forNumber(int value) { switch (value) { case 0: return DATA_STATE_UNSPECIFIED; case 1: return DATA_OK; case 2: return DATA_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 DataState findValueByNumber(int number) { return DataState.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.retail.v2beta.Model.getDescriptor().getEnumTypes().get(3); } private static final DataState[] VALUES = values(); public static DataState 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 DataState(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.DataState) } public interface ServingConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model.ServingConfigList) com.google.protobuf.MessageOrBuilder { /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the servingConfigIds. */ java.util.List getServingConfigIdsList(); /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of servingConfigIds. */ int getServingConfigIdsCount(); /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The servingConfigIds at the given index. */ java.lang.String getServingConfigIds(int index); /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The bytes of the servingConfigIds at the given index. */ com.google.protobuf.ByteString getServingConfigIdsBytes(int index); } /** * * *
   * Represents an ordered combination of valid serving configs, which
   * can be used for `PAGE_OPTIMIZATION` recommendations.
   * 
* * Protobuf type {@code google.cloud.retail.v2beta.Model.ServingConfigList} */ public static final class ServingConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model.ServingConfigList) ServingConfigListOrBuilder { private static final long serialVersionUID = 0L; // Use ServingConfigList.newBuilder() to construct. private ServingConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ServingConfigList() { servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ServingConfigList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.retail.v2beta.Model.ServingConfigList.class, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder.class); } public static final int SERVING_CONFIG_IDS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the servingConfigIds. */ public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { return servingConfigIds_; } /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of servingConfigIds. */ public int getServingConfigIdsCount() { return servingConfigIds_.size(); } /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The servingConfigIds at the given index. */ public java.lang.String getServingConfigIds(int index) { return servingConfigIds_.get(index); } /** * * *
     * Optional. A set of valid serving configs that may be used for
     * `PAGE_OPTIMIZATION`.
     * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The bytes of the servingConfigIds at the given index. */ public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { return servingConfigIds_.getByteString(index); } 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 { for (int i = 0; i < servingConfigIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfigIds_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < servingConfigIds_.size(); i++) { dataSize += computeStringSizeNoTag(servingConfigIds_.getRaw(i)); } size += dataSize; size += 1 * getServingConfigIdsList().size(); } 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.retail.v2beta.Model.ServingConfigList)) { return super.equals(obj); } com.google.cloud.retail.v2beta.Model.ServingConfigList other = (com.google.cloud.retail.v2beta.Model.ServingConfigList) obj; if (!getServingConfigIdsList().equals(other.getServingConfigIdsList())) 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 (getServingConfigIdsCount() > 0) { hash = (37 * hash) + SERVING_CONFIG_IDS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigIdsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList 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.retail.v2beta.Model.ServingConfigList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList 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.retail.v2beta.Model.ServingConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList 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.retail.v2beta.Model.ServingConfigList parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList 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.retail.v2beta.Model.ServingConfigList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList 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.retail.v2beta.Model.ServingConfigList 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; } /** * * *
     * Represents an ordered combination of valid serving configs, which
     * can be used for `PAGE_OPTIMIZATION` recommendations.
     * 
* * Protobuf type {@code google.cloud.retail.v2beta.Model.ServingConfigList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model.ServingConfigList) com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.retail.v2beta.Model.ServingConfigList.class, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder.class); } // Construct using com.google.cloud.retail.v2beta.Model.ServingConfigList.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; } @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { return com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance(); } @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingConfigList build() { com.google.cloud.retail.v2beta.Model.ServingConfigList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingConfigList buildPartial() { com.google.cloud.retail.v2beta.Model.ServingConfigList result = new com.google.cloud.retail.v2beta.Model.ServingConfigList(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.retail.v2beta.Model.ServingConfigList result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { servingConfigIds_.makeImmutable(); result.servingConfigIds_ = servingConfigIds_; } } @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.retail.v2beta.Model.ServingConfigList) { return mergeFrom((com.google.cloud.retail.v2beta.Model.ServingConfigList) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.retail.v2beta.Model.ServingConfigList other) { if (other == com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()) return this; if (!other.servingConfigIds_.isEmpty()) { if (servingConfigIds_.isEmpty()) { servingConfigIds_ = other.servingConfigIds_; bitField0_ |= 0x00000001; } else { ensureServingConfigIdsIsMutable(); servingConfigIds_.addAll(other.servingConfigIds_); } 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 10: { java.lang.String s = input.readStringRequireUtf8(); ensureServingConfigIdsIsMutable(); servingConfigIds_.add(s); break; } // case 10 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.protobuf.LazyStringArrayList servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureServingConfigIdsIsMutable() { if (!servingConfigIds_.isModifiable()) { servingConfigIds_ = new com.google.protobuf.LazyStringArrayList(servingConfigIds_); } bitField0_ |= 0x00000001; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the servingConfigIds. */ public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { servingConfigIds_.makeImmutable(); return servingConfigIds_; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of servingConfigIds. */ public int getServingConfigIdsCount() { return servingConfigIds_.size(); } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The servingConfigIds at the given index. */ public java.lang.String getServingConfigIds(int index) { return servingConfigIds_.get(index); } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The bytes of the servingConfigIds at the given index. */ public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { return servingConfigIds_.getByteString(index); } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index to set the value at. * @param value The servingConfigIds to set. * @return This builder for chaining. */ public Builder setServingConfigIds(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureServingConfigIdsIsMutable(); servingConfigIds_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The servingConfigIds to add. * @return This builder for chaining. */ public Builder addServingConfigIds(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureServingConfigIdsIsMutable(); servingConfigIds_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param values The servingConfigIds to add. * @return This builder for chaining. */ public Builder addAllServingConfigIds(java.lang.Iterable values) { ensureServingConfigIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearServingConfigIds() { servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; } /** * * *
       * Optional. A set of valid serving configs that may be used for
       * `PAGE_OPTIMIZATION`.
       * 
* * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The bytes of the servingConfigIds to add. * @return This builder for chaining. */ public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureServingConfigIdsIsMutable(); servingConfigIds_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.ServingConfigList) } // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.ServingConfigList) private static final com.google.cloud.retail.v2beta.Model.ServingConfigList DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model.ServingConfigList(); } public static com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ServingConfigList 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.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Required. The fully qualified resource name of the model.
   *
   * Format:
   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
   * catalog_id has char limit of 50.
   * recommendation_model_id has char limit of 40.
   * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** * * *
   * Required. The fully qualified resource name of the model.
   *
   * Format:
   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
   * catalog_id has char limit of 50.
   * recommendation_model_id has char limit of 40.
   * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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_ = ""; /** * * *
   * Required. The display name of the model.
   *
   * Should be human readable, used to display Recommendation Models in the
   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
   * characters.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; 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(); displayName_ = s; return s; } } /** * * *
   * Required. The display name of the model.
   *
   * Should be human readable, used to display Recommendation Models in the
   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
   * characters.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @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 TRAINING_STATE_FIELD_NUMBER = 3; private int trainingState_ = 0; /** * * *
   * Optional. The training state that the model is in (e.g.
   * `TRAINING` or `PAUSED`).
   *
   * Since part of the cost of running the service
   * is frequency of training - this can be used to determine when to train
   * model in order to control cost. If not specified: the default value for
   * `CreateModel` method is `TRAINING`. The default value for
   * `UpdateModel` method is to keep the state the same as before.
   * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for trainingState. */ @java.lang.Override public int getTrainingStateValue() { return trainingState_; } /** * * *
   * Optional. The training state that the model is in (e.g.
   * `TRAINING` or `PAUSED`).
   *
   * Since part of the cost of running the service
   * is frequency of training - this can be used to determine when to train
   * model in order to control cost. If not specified: the default value for
   * `CreateModel` method is `TRAINING`. The default value for
   * `UpdateModel` method is to keep the state the same as before.
   * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The trainingState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.TrainingState getTrainingState() { com.google.cloud.retail.v2beta.Model.TrainingState result = com.google.cloud.retail.v2beta.Model.TrainingState.forNumber(trainingState_); return result == null ? com.google.cloud.retail.v2beta.Model.TrainingState.UNRECOGNIZED : result; } public static final int SERVING_STATE_FIELD_NUMBER = 4; private int servingState_ = 0; /** * * *
   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
   * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for servingState. */ @java.lang.Override public int getServingStateValue() { return servingState_; } /** * * *
   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
   * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The servingState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingState getServingState() { com.google.cloud.retail.v2beta.Model.ServingState result = com.google.cloud.retail.v2beta.Model.ServingState.forNumber(servingState_); return result == null ? com.google.cloud.retail.v2beta.Model.ServingState.UNRECOGNIZED : result; } public static final int CREATE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. Timestamp the Recommendation Model was created at.
   * 
* * .google.protobuf.Timestamp create_time = 5 [(.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. Timestamp the Recommendation Model was created at.
   * 
* * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * Output only. Timestamp the Recommendation Model was created at.
   * 
* * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } public static final int UPDATE_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp updateTime_; /** * * *
   * Output only. Timestamp the Recommendation Model was last updated. E.g.
   * if a Recommendation Model was paused - this would be the time the pause was
   * initiated.
   * 
* * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ @java.lang.Override public boolean hasUpdateTime() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Output only. Timestamp the Recommendation Model was last updated. E.g.
   * if a Recommendation Model was paused - this would be the time the pause was
   * initiated.
   * 
* * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
   * Output only. Timestamp the Recommendation Model was last updated. E.g.
   * if a Recommendation Model was paused - this would be the time the pause was
   * initiated.
   * 
* * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } public static final int TYPE_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object type_ = ""; /** * * *
   * Required. The type of model e.g. `home-page`.
   *
   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
   * `frequently-bought-together`, `page-optimization`, `similar-items`,
   * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
   *
   *
   * This field together with
   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
   * describe model metadata to use to control model training and serving.
   * See https://cloud.google.com/retail/docs/models
   * for more details on what the model metadata control and which combination
   * of parameters are valid. For invalid combinations of parameters (e.g. type
   * = `frequently-bought-together` and optimization_objective = `ctr`), you
   * receive an error 400 if you try to create/update a recommendation with
   * this set of knobs.
   * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @return The type. */ @java.lang.Override public java.lang.String getType() { java.lang.Object ref = type_; 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(); type_ = s; return s; } } /** * * *
   * Required. The type of model e.g. `home-page`.
   *
   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
   * `frequently-bought-together`, `page-optimization`, `similar-items`,
   * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
   *
   *
   * This field together with
   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
   * describe model metadata to use to control model training and serving.
   * See https://cloud.google.com/retail/docs/models
   * for more details on what the model metadata control and which combination
   * of parameters are valid. For invalid combinations of parameters (e.g. type
   * = `frequently-bought-together` and optimization_objective = `ctr`), you
   * receive an error 400 if you try to create/update a recommendation with
   * this set of knobs.
   * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for type. */ @java.lang.Override public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object optimizationObjective_ = ""; /** * * *
   * Optional. The optimization objective e.g. `cvr`.
   *
   * Currently supported
   * values: `ctr`, `cvr`, `revenue-per-order`.
   *
   *  If not specified, we choose default based on model type.
   * Default depends on type of recommendation:
   *
   * `recommended-for-you` => `ctr`
   *
   * `others-you-may-like` => `ctr`
   *
   * `frequently-bought-together` => `revenue_per_order`
   *
   * This field together with
   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
   * describe model metadata to use to control model training and serving.
   * See https://cloud.google.com/retail/docs/models
   * for more details on what the model metadata control and which combination
   * of parameters are valid. For invalid combinations of parameters (e.g. type
   * = `frequently-bought-together` and optimization_objective = `ctr`), you
   * receive an error 400 if you try to create/update a recommendation with
   * this set of knobs.
   * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The optimizationObjective. */ @java.lang.Override public java.lang.String getOptimizationObjective() { java.lang.Object ref = optimizationObjective_; 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(); optimizationObjective_ = s; return s; } } /** * * *
   * Optional. The optimization objective e.g. `cvr`.
   *
   * Currently supported
   * values: `ctr`, `cvr`, `revenue-per-order`.
   *
   *  If not specified, we choose default based on model type.
   * Default depends on type of recommendation:
   *
   * `recommended-for-you` => `ctr`
   *
   * `others-you-may-like` => `ctr`
   *
   * `frequently-bought-together` => `revenue_per_order`
   *
   * This field together with
   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
   * describe model metadata to use to control model training and serving.
   * See https://cloud.google.com/retail/docs/models
   * for more details on what the model metadata control and which combination
   * of parameters are valid. For invalid combinations of parameters (e.g. type
   * = `frequently-bought-together` and optimization_objective = `ctr`), you
   * receive an error 400 if you try to create/update a recommendation with
   * this set of knobs.
   * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for optimizationObjective. */ @java.lang.Override public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { java.lang.Object ref = optimizationObjective_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); optimizationObjective_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERIODIC_TUNING_STATE_FIELD_NUMBER = 11; private int periodicTuningState_ = 0; /** * * *
   * Optional. The state of periodic tuning.
   *
   * The period we use is 3 months - to do a
   * one-off tune earlier use the `TuneModel` method. Default value
   * is `PERIODIC_TUNING_ENABLED`.
   * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for periodicTuningState. */ @java.lang.Override public int getPeriodicTuningStateValue() { return periodicTuningState_; } /** * * *
   * Optional. The state of periodic tuning.
   *
   * The period we use is 3 months - to do a
   * one-off tune earlier use the `TuneModel` method. Default value
   * is `PERIODIC_TUNING_ENABLED`.
   * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The periodicTuningState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.PeriodicTuningState getPeriodicTuningState() { com.google.cloud.retail.v2beta.Model.PeriodicTuningState result = com.google.cloud.retail.v2beta.Model.PeriodicTuningState.forNumber(periodicTuningState_); return result == null ? com.google.cloud.retail.v2beta.Model.PeriodicTuningState.UNRECOGNIZED : result; } public static final int LAST_TUNE_TIME_FIELD_NUMBER = 12; private com.google.protobuf.Timestamp lastTuneTime_; /** * * *
   * Output only. The timestamp when the latest successful tune finished.
   * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the lastTuneTime field is set. */ @java.lang.Override public boolean hasLastTuneTime() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Output only. The timestamp when the latest successful tune finished.
   * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The lastTuneTime. */ @java.lang.Override public com.google.protobuf.Timestamp getLastTuneTime() { return lastTuneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastTuneTime_; } /** * * *
   * Output only. The timestamp when the latest successful tune finished.
   * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { return lastTuneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastTuneTime_; } public static final int TUNING_OPERATION_FIELD_NUMBER = 15; @SuppressWarnings("serial") private volatile java.lang.Object tuningOperation_ = ""; /** * * *
   * Output only. The tune operation associated with the model.
   *
   * Can be used to determine if there is an ongoing tune for this
   * recommendation. Empty field implies no tune is goig on.
   * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The tuningOperation. */ @java.lang.Override public java.lang.String getTuningOperation() { java.lang.Object ref = tuningOperation_; 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(); tuningOperation_ = s; return s; } } /** * * *
   * Output only. The tune operation associated with the model.
   *
   * Can be used to determine if there is an ongoing tune for this
   * recommendation. Empty field implies no tune is goig on.
   * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for tuningOperation. */ @java.lang.Override public com.google.protobuf.ByteString getTuningOperationBytes() { java.lang.Object ref = tuningOperation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tuningOperation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DATA_STATE_FIELD_NUMBER = 16; private int dataState_ = 0; /** * * *
   * Output only. The state of data requirements for this model: `DATA_OK` and
   * `DATA_ERROR`.
   *
   * Recommendation model cannot be trained if the data is in
   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
   * if serving state is `ACTIVE`: models were trained successfully before, but
   * cannot be refreshed because model no longer has sufficient
   * data for training.
   * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for dataState. */ @java.lang.Override public int getDataStateValue() { return dataState_; } /** * * *
   * Output only. The state of data requirements for this model: `DATA_OK` and
   * `DATA_ERROR`.
   *
   * Recommendation model cannot be trained if the data is in
   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
   * if serving state is `ACTIVE`: models were trained successfully before, but
   * cannot be refreshed because model no longer has sufficient
   * data for training.
   * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The dataState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.DataState getDataState() { com.google.cloud.retail.v2beta.Model.DataState result = com.google.cloud.retail.v2beta.Model.DataState.forNumber(dataState_); return result == null ? com.google.cloud.retail.v2beta.Model.DataState.UNRECOGNIZED : result; } public static final int FILTERING_OPTION_FIELD_NUMBER = 18; private int filteringOption_ = 0; /** * * *
   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
   * by attributes is enabled for the model.
   * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for filteringOption. */ @java.lang.Override public int getFilteringOptionValue() { return filteringOption_; } /** * * *
   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
   * by attributes is enabled for the model.
   * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The filteringOption. */ @java.lang.Override public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getFilteringOption() { com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = com.google.cloud.retail.v2beta.RecommendationsFilteringOption.forNumber(filteringOption_); return result == null ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED : result; } public static final int SERVING_CONFIG_LISTS_FIELD_NUMBER = 19; @SuppressWarnings("serial") private java.util.List servingConfigLists_; /** * * *
   * Output only. The list of valid serving configs associated with the
   * PageOptimizationConfig.
   * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getServingConfigListsList() { return servingConfigLists_; } /** * * *
   * Output only. The list of valid serving configs associated with the
   * PageOptimizationConfig.
   * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getServingConfigListsOrBuilderList() { return servingConfigLists_; } /** * * *
   * Output only. The list of valid serving configs associated with the
   * PageOptimizationConfig.
   * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public int getServingConfigListsCount() { return servingConfigLists_.size(); } /** * * *
   * Output only. The list of valid serving configs associated with the
   * PageOptimizationConfig.
   * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLists(int index) { return servingConfigLists_.get(index); } /** * * *
   * Output only. The list of valid serving configs associated with the
   * PageOptimizationConfig.
   * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder(int index) { return servingConfigLists_.get(index); } 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 (trainingState_ != com.google.cloud.retail.v2beta.Model.TrainingState.TRAINING_STATE_UNSPECIFIED .getNumber()) { output.writeEnum(3, trainingState_); } if (servingState_ != com.google.cloud.retail.v2beta.Model.ServingState.SERVING_STATE_UNSPECIFIED .getNumber()) { output.writeEnum(4, servingState_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getCreateTime()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getUpdateTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, optimizationObjective_); } if (periodicTuningState_ != com.google.cloud.retail.v2beta.Model.PeriodicTuningState .PERIODIC_TUNING_STATE_UNSPECIFIED .getNumber()) { output.writeEnum(11, periodicTuningState_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(12, getLastTuneTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, tuningOperation_); } if (dataState_ != com.google.cloud.retail.v2beta.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { output.writeEnum(16, dataState_); } if (filteringOption_ != com.google.cloud.retail.v2beta.RecommendationsFilteringOption .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED .getNumber()) { output.writeEnum(18, filteringOption_); } for (int i = 0; i < servingConfigLists_.size(); i++) { output.writeMessage(19, servingConfigLists_.get(i)); } 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 (trainingState_ != com.google.cloud.retail.v2beta.Model.TrainingState.TRAINING_STATE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, trainingState_); } if (servingState_ != com.google.cloud.retail.v2beta.Model.ServingState.SERVING_STATE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, servingState_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, optimizationObjective_); } if (periodicTuningState_ != com.google.cloud.retail.v2beta.Model.PeriodicTuningState .PERIODIC_TUNING_STATE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, periodicTuningState_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTuneTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, tuningOperation_); } if (dataState_ != com.google.cloud.retail.v2beta.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, dataState_); } if (filteringOption_ != com.google.cloud.retail.v2beta.RecommendationsFilteringOption .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, filteringOption_); } for (int i = 0; i < servingConfigLists_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); } 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.retail.v2beta.Model)) { return super.equals(obj); } com.google.cloud.retail.v2beta.Model other = (com.google.cloud.retail.v2beta.Model) obj; if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (trainingState_ != other.trainingState_) return false; if (servingState_ != other.servingState_) 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 (!getType().equals(other.getType())) return false; if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; if (periodicTuningState_ != other.periodicTuningState_) return false; if (hasLastTuneTime() != other.hasLastTuneTime()) return false; if (hasLastTuneTime()) { if (!getLastTuneTime().equals(other.getLastTuneTime())) return false; } if (!getTuningOperation().equals(other.getTuningOperation())) return false; if (dataState_ != other.dataState_) return false; if (filteringOption_ != other.filteringOption_) return false; if (!getServingConfigListsList().equals(other.getServingConfigListsList())) 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) + TRAINING_STATE_FIELD_NUMBER; hash = (53 * hash) + trainingState_; hash = (37 * hash) + SERVING_STATE_FIELD_NUMBER; hash = (53 * hash) + servingState_; 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(); } hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; hash = (53 * hash) + getOptimizationObjective().hashCode(); hash = (37 * hash) + PERIODIC_TUNING_STATE_FIELD_NUMBER; hash = (53 * hash) + periodicTuningState_; if (hasLastTuneTime()) { hash = (37 * hash) + LAST_TUNE_TIME_FIELD_NUMBER; hash = (53 * hash) + getLastTuneTime().hashCode(); } hash = (37 * hash) + TUNING_OPERATION_FIELD_NUMBER; hash = (53 * hash) + getTuningOperation().hashCode(); hash = (37 * hash) + DATA_STATE_FIELD_NUMBER; hash = (53 * hash) + dataState_; hash = (37 * hash) + FILTERING_OPTION_FIELD_NUMBER; hash = (53 * hash) + filteringOption_; if (getServingConfigListsCount() > 0) { hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigListsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.retail.v2beta.Model parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model 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.retail.v2beta.Model parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model 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.retail.v2beta.Model parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.retail.v2beta.Model parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.retail.v2beta.Model parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model 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.retail.v2beta.Model parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model 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.retail.v2beta.Model parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.retail.v2beta.Model 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.retail.v2beta.Model 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; } /** * * *
   * Metadata that describes the training and serving parameters of a
   * [Model][google.cloud.retail.v2beta.Model]. A
   * [Model][google.cloud.retail.v2beta.Model] can be associated with a
   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and then queried
   * through the Predict API.
   * 
* * Protobuf type {@code google.cloud.retail.v2beta.Model} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model) com.google.cloud.retail.v2beta.ModelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.retail.v2beta.Model.class, com.google.cloud.retail.v2beta.Model.Builder.class); } // Construct using com.google.cloud.retail.v2beta.Model.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(); getLastTuneTimeFieldBuilder(); getServingConfigListsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; displayName_ = ""; trainingState_ = 0; servingState_ = 0; createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } type_ = ""; optimizationObjective_ = ""; periodicTuningState_ = 0; lastTuneTime_ = null; if (lastTuneTimeBuilder_ != null) { lastTuneTimeBuilder_.dispose(); lastTuneTimeBuilder_ = null; } tuningOperation_ = ""; dataState_ = 0; filteringOption_ = 0; if (servingConfigListsBuilder_ == null) { servingConfigLists_ = java.util.Collections.emptyList(); } else { servingConfigLists_ = null; servingConfigListsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00002000); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.retail.v2beta.ModelProto .internal_static_google_cloud_retail_v2beta_Model_descriptor; } @java.lang.Override public com.google.cloud.retail.v2beta.Model getDefaultInstanceForType() { return com.google.cloud.retail.v2beta.Model.getDefaultInstance(); } @java.lang.Override public com.google.cloud.retail.v2beta.Model build() { com.google.cloud.retail.v2beta.Model result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.retail.v2beta.Model buildPartial() { com.google.cloud.retail.v2beta.Model result = new com.google.cloud.retail.v2beta.Model(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.retail.v2beta.Model result) { if (servingConfigListsBuilder_ == null) { if (((bitField0_ & 0x00002000) != 0)) { servingConfigLists_ = java.util.Collections.unmodifiableList(servingConfigLists_); bitField0_ = (bitField0_ & ~0x00002000); } result.servingConfigLists_ = servingConfigLists_; } else { result.servingConfigLists_ = servingConfigListsBuilder_.build(); } } private void buildPartial0(com.google.cloud.retail.v2beta.Model 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.trainingState_ = trainingState_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.servingState_ = servingState_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000040) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.optimizationObjective_ = optimizationObjective_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.periodicTuningState_ = periodicTuningState_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.lastTuneTime_ = lastTuneTimeBuilder_ == null ? lastTuneTime_ : lastTuneTimeBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000400) != 0)) { result.tuningOperation_ = tuningOperation_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.dataState_ = dataState_; } if (((from_bitField0_ & 0x00001000) != 0)) { result.filteringOption_ = filteringOption_; } 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.retail.v2beta.Model) { return mergeFrom((com.google.cloud.retail.v2beta.Model) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.retail.v2beta.Model other) { if (other == com.google.cloud.retail.v2beta.Model.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.trainingState_ != 0) { setTrainingStateValue(other.getTrainingStateValue()); } if (other.servingState_ != 0) { setServingStateValue(other.getServingStateValue()); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } if (!other.getType().isEmpty()) { type_ = other.type_; bitField0_ |= 0x00000040; onChanged(); } if (!other.getOptimizationObjective().isEmpty()) { optimizationObjective_ = other.optimizationObjective_; bitField0_ |= 0x00000080; onChanged(); } if (other.periodicTuningState_ != 0) { setPeriodicTuningStateValue(other.getPeriodicTuningStateValue()); } if (other.hasLastTuneTime()) { mergeLastTuneTime(other.getLastTuneTime()); } if (!other.getTuningOperation().isEmpty()) { tuningOperation_ = other.tuningOperation_; bitField0_ |= 0x00000400; onChanged(); } if (other.dataState_ != 0) { setDataStateValue(other.getDataStateValue()); } if (other.filteringOption_ != 0) { setFilteringOptionValue(other.getFilteringOptionValue()); } if (servingConfigListsBuilder_ == null) { if (!other.servingConfigLists_.isEmpty()) { if (servingConfigLists_.isEmpty()) { servingConfigLists_ = other.servingConfigLists_; bitField0_ = (bitField0_ & ~0x00002000); } else { ensureServingConfigListsIsMutable(); servingConfigLists_.addAll(other.servingConfigLists_); } onChanged(); } } else { if (!other.servingConfigLists_.isEmpty()) { if (servingConfigListsBuilder_.isEmpty()) { servingConfigListsBuilder_.dispose(); servingConfigListsBuilder_ = null; servingConfigLists_ = other.servingConfigLists_; bitField0_ = (bitField0_ & ~0x00002000); servingConfigListsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServingConfigListsFieldBuilder() : null; } else { servingConfigListsBuilder_.addAllMessages(other.servingConfigLists_); } } } 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 24: { trainingState_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { servingState_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 42: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { type_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case 58 case 66: { optimizationObjective_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 66 case 88: { periodicTuningState_ = input.readEnum(); bitField0_ |= 0x00000100; break; } // case 88 case 98: { input.readMessage(getLastTuneTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 98 case 122: { tuningOperation_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000400; break; } // case 122 case 128: { dataState_ = input.readEnum(); bitField0_ |= 0x00000800; break; } // case 128 case 144: { filteringOption_ = input.readEnum(); bitField0_ |= 0x00001000; break; } // case 144 case 154: { com.google.cloud.retail.v2beta.Model.ServingConfigList m = input.readMessage( com.google.cloud.retail.v2beta.Model.ServingConfigList.parser(), extensionRegistry); if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); servingConfigLists_.add(m); } else { servingConfigListsBuilder_.addMessage(m); } break; } // case 154 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_ = ""; /** * * *
     * Required. The fully qualified resource name of the model.
     *
     * Format:
     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
     * catalog_id has char limit of 50.
     * recommendation_model_id has char limit of 40.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The fully qualified resource name of the model.
     *
     * Format:
     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
     * catalog_id has char limit of 50.
     * recommendation_model_id has char limit of 40.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. The fully qualified resource name of the model.
     *
     * Format:
     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
     * catalog_id has char limit of 50.
     * recommendation_model_id has char limit of 40.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } /** * * *
     * Required. The fully qualified resource name of the model.
     *
     * Format:
     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
     * catalog_id has char limit of 50.
     * recommendation_model_id has char limit of 40.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The fully qualified resource name of the model.
     *
     * Format:
     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
     * catalog_id has char limit of 50.
     * recommendation_model_id has char limit of 40.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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_ = ""; /** * * *
     * Required. The display name of the model.
     *
     * Should be human readable, used to display Recommendation Models in the
     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
     * characters.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The display name of the model.
     *
     * Should be human readable, used to display Recommendation Models in the
     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
     * characters.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof 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; } } /** * * *
     * Required. The display name of the model.
     *
     * Should be human readable, used to display Recommendation Models in the
     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
     * characters.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Required. The display name of the model.
     *
     * Should be human readable, used to display Recommendation Models in the
     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
     * characters.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Required. The display name of the model.
     *
     * Should be human readable, used to display Recommendation Models in the
     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
     * characters.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @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 int trainingState_ = 0; /** * * *
     * Optional. The training state that the model is in (e.g.
     * `TRAINING` or `PAUSED`).
     *
     * Since part of the cost of running the service
     * is frequency of training - this can be used to determine when to train
     * model in order to control cost. If not specified: the default value for
     * `CreateModel` method is `TRAINING`. The default value for
     * `UpdateModel` method is to keep the state the same as before.
     * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for trainingState. */ @java.lang.Override public int getTrainingStateValue() { return trainingState_; } /** * * *
     * Optional. The training state that the model is in (e.g.
     * `TRAINING` or `PAUSED`).
     *
     * Since part of the cost of running the service
     * is frequency of training - this can be used to determine when to train
     * model in order to control cost. If not specified: the default value for
     * `CreateModel` method is `TRAINING`. The default value for
     * `UpdateModel` method is to keep the state the same as before.
     * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for trainingState to set. * @return This builder for chaining. */ public Builder setTrainingStateValue(int value) { trainingState_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. The training state that the model is in (e.g.
     * `TRAINING` or `PAUSED`).
     *
     * Since part of the cost of running the service
     * is frequency of training - this can be used to determine when to train
     * model in order to control cost. If not specified: the default value for
     * `CreateModel` method is `TRAINING`. The default value for
     * `UpdateModel` method is to keep the state the same as before.
     * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The trainingState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.TrainingState getTrainingState() { com.google.cloud.retail.v2beta.Model.TrainingState result = com.google.cloud.retail.v2beta.Model.TrainingState.forNumber(trainingState_); return result == null ? com.google.cloud.retail.v2beta.Model.TrainingState.UNRECOGNIZED : result; } /** * * *
     * Optional. The training state that the model is in (e.g.
     * `TRAINING` or `PAUSED`).
     *
     * Since part of the cost of running the service
     * is frequency of training - this can be used to determine when to train
     * model in order to control cost. If not specified: the default value for
     * `CreateModel` method is `TRAINING`. The default value for
     * `UpdateModel` method is to keep the state the same as before.
     * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The trainingState to set. * @return This builder for chaining. */ public Builder setTrainingState(com.google.cloud.retail.v2beta.Model.TrainingState value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; trainingState_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. The training state that the model is in (e.g.
     * `TRAINING` or `PAUSED`).
     *
     * Since part of the cost of running the service
     * is frequency of training - this can be used to determine when to train
     * model in order to control cost. If not specified: the default value for
     * `CreateModel` method is `TRAINING`. The default value for
     * `UpdateModel` method is to keep the state the same as before.
     * 
* * * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearTrainingState() { bitField0_ = (bitField0_ & ~0x00000004); trainingState_ = 0; onChanged(); return this; } private int servingState_ = 0; /** * * *
     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
     * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for servingState. */ @java.lang.Override public int getServingStateValue() { return servingState_; } /** * * *
     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
     * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The enum numeric value on the wire for servingState to set. * @return This builder for chaining. */ public Builder setServingStateValue(int value) { servingState_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
     * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The servingState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.ServingState getServingState() { com.google.cloud.retail.v2beta.Model.ServingState result = com.google.cloud.retail.v2beta.Model.ServingState.forNumber(servingState_); return result == null ? com.google.cloud.retail.v2beta.Model.ServingState.UNRECOGNIZED : result; } /** * * *
     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
     * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The servingState to set. * @return This builder for chaining. */ public Builder setServingState(com.google.cloud.retail.v2beta.Model.ServingState value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; servingState_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
     * 
* * * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearServingState() { bitField0_ = (bitField0_ & ~0x00000008); servingState_ = 0; 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. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; } else { createTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000010); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * Output only. Timestamp the Recommendation Model was created at.
     * 
* * * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } else { return updateTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateTime_ = value; } else { updateTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { updateTime_ = builderForValue.build(); } else { updateTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); } else { updateTime_ = value; } } else { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000020); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { return updateTimeBuilder_.getMessageOrBuilder(); } else { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } } /** * * *
     * Output only. Timestamp the Recommendation Model was last updated. E.g.
     * if a Recommendation Model was paused - this would be the time the pause was
     * initiated.
     * 
* * * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdateTime(), getParentForChildren(), isClean()); updateTime_ = null; } return updateTimeBuilder_; } private java.lang.Object type_ = ""; /** * * *
     * Required. The type of model e.g. `home-page`.
     *
     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
     * `frequently-bought-together`, `page-optimization`, `similar-items`,
     * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
     *
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The type of model e.g. `home-page`.
     *
     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
     * `frequently-bought-together`, `page-optimization`, `similar-items`,
     * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
     *
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for type. */ public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The type of model e.g. `home-page`.
     *
     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
     * `frequently-bought-together`, `page-optimization`, `similar-items`,
     * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
     *
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } type_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Required. The type of model e.g. `home-page`.
     *
     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
     * `frequently-bought-together`, `page-optimization`, `similar-items`,
     * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
     *
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearType() { type_ = getDefaultInstance().getType(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * * *
     * Required. The type of model e.g. `home-page`.
     *
     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
     * `frequently-bought-together`, `page-optimization`, `similar-items`,
     * `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
     *
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string type = 7 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for type to set. * @return This builder for chaining. */ public Builder setTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); type_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } private java.lang.Object optimizationObjective_ = ""; /** * * *
     * Optional. The optimization objective e.g. `cvr`.
     *
     * Currently supported
     * values: `ctr`, `cvr`, `revenue-per-order`.
     *
     *  If not specified, we choose default based on model type.
     * Default depends on type of recommendation:
     *
     * `recommended-for-you` => `ctr`
     *
     * `others-you-may-like` => `ctr`
     *
     * `frequently-bought-together` => `revenue_per_order`
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The optimizationObjective. */ public java.lang.String getOptimizationObjective() { java.lang.Object ref = optimizationObjective_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); optimizationObjective_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The optimization objective e.g. `cvr`.
     *
     * Currently supported
     * values: `ctr`, `cvr`, `revenue-per-order`.
     *
     *  If not specified, we choose default based on model type.
     * Default depends on type of recommendation:
     *
     * `recommended-for-you` => `ctr`
     *
     * `others-you-may-like` => `ctr`
     *
     * `frequently-bought-together` => `revenue_per_order`
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for optimizationObjective. */ public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { java.lang.Object ref = optimizationObjective_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); optimizationObjective_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The optimization objective e.g. `cvr`.
     *
     * Currently supported
     * values: `ctr`, `cvr`, `revenue-per-order`.
     *
     *  If not specified, we choose default based on model type.
     * Default depends on type of recommendation:
     *
     * `recommended-for-you` => `ctr`
     *
     * `others-you-may-like` => `ctr`
     *
     * `frequently-bought-together` => `revenue_per_order`
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The optimizationObjective to set. * @return This builder for chaining. */ public Builder setOptimizationObjective(java.lang.String value) { if (value == null) { throw new NullPointerException(); } optimizationObjective_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Optional. The optimization objective e.g. `cvr`.
     *
     * Currently supported
     * values: `ctr`, `cvr`, `revenue-per-order`.
     *
     *  If not specified, we choose default based on model type.
     * Default depends on type of recommendation:
     *
     * `recommended-for-you` => `ctr`
     *
     * `others-you-may-like` => `ctr`
     *
     * `frequently-bought-together` => `revenue_per_order`
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearOptimizationObjective() { optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * * *
     * Optional. The optimization objective e.g. `cvr`.
     *
     * Currently supported
     * values: `ctr`, `cvr`, `revenue-per-order`.
     *
     *  If not specified, we choose default based on model type.
     * Default depends on type of recommendation:
     *
     * `recommended-for-you` => `ctr`
     *
     * `others-you-may-like` => `ctr`
     *
     * `frequently-bought-together` => `revenue_per_order`
     *
     * This field together with
     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
     * describe model metadata to use to control model training and serving.
     * See https://cloud.google.com/retail/docs/models
     * for more details on what the model metadata control and which combination
     * of parameters are valid. For invalid combinations of parameters (e.g. type
     * = `frequently-bought-together` and optimization_objective = `ctr`), you
     * receive an error 400 if you try to create/update a recommendation with
     * this set of knobs.
     * 
* * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for optimizationObjective to set. * @return This builder for chaining. */ public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); optimizationObjective_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private int periodicTuningState_ = 0; /** * * *
     * Optional. The state of periodic tuning.
     *
     * The period we use is 3 months - to do a
     * one-off tune earlier use the `TuneModel` method. Default value
     * is `PERIODIC_TUNING_ENABLED`.
     * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for periodicTuningState. */ @java.lang.Override public int getPeriodicTuningStateValue() { return periodicTuningState_; } /** * * *
     * Optional. The state of periodic tuning.
     *
     * The period we use is 3 months - to do a
     * one-off tune earlier use the `TuneModel` method. Default value
     * is `PERIODIC_TUNING_ENABLED`.
     * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for periodicTuningState to set. * @return This builder for chaining. */ public Builder setPeriodicTuningStateValue(int value) { periodicTuningState_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * Optional. The state of periodic tuning.
     *
     * The period we use is 3 months - to do a
     * one-off tune earlier use the `TuneModel` method. Default value
     * is `PERIODIC_TUNING_ENABLED`.
     * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The periodicTuningState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.PeriodicTuningState getPeriodicTuningState() { com.google.cloud.retail.v2beta.Model.PeriodicTuningState result = com.google.cloud.retail.v2beta.Model.PeriodicTuningState.forNumber(periodicTuningState_); return result == null ? com.google.cloud.retail.v2beta.Model.PeriodicTuningState.UNRECOGNIZED : result; } /** * * *
     * Optional. The state of periodic tuning.
     *
     * The period we use is 3 months - to do a
     * one-off tune earlier use the `TuneModel` method. Default value
     * is `PERIODIC_TUNING_ENABLED`.
     * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The periodicTuningState to set. * @return This builder for chaining. */ public Builder setPeriodicTuningState( com.google.cloud.retail.v2beta.Model.PeriodicTuningState value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; periodicTuningState_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. The state of periodic tuning.
     *
     * The period we use is 3 months - to do a
     * one-off tune earlier use the `TuneModel` method. Default value
     * is `PERIODIC_TUNING_ENABLED`.
     * 
* * * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearPeriodicTuningState() { bitField0_ = (bitField0_ & ~0x00000100); periodicTuningState_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp lastTuneTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastTuneTimeBuilder_; /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the lastTuneTime field is set. */ public boolean hasLastTuneTime() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The lastTuneTime. */ public com.google.protobuf.Timestamp getLastTuneTime() { if (lastTuneTimeBuilder_ == null) { return lastTuneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastTuneTime_; } else { return lastTuneTimeBuilder_.getMessage(); } } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setLastTuneTime(com.google.protobuf.Timestamp value) { if (lastTuneTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lastTuneTime_ = value; } else { lastTuneTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setLastTuneTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (lastTuneTimeBuilder_ == null) { lastTuneTime_ = builderForValue.build(); } else { lastTuneTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeLastTuneTime(com.google.protobuf.Timestamp value) { if (lastTuneTimeBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && lastTuneTime_ != null && lastTuneTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getLastTuneTimeBuilder().mergeFrom(value); } else { lastTuneTime_ = value; } } else { lastTuneTimeBuilder_.mergeFrom(value); } if (lastTuneTime_ != null) { bitField0_ |= 0x00000200; onChanged(); } return this; } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearLastTuneTime() { bitField0_ = (bitField0_ & ~0x00000200); lastTuneTime_ = null; if (lastTuneTimeBuilder_ != null) { lastTuneTimeBuilder_.dispose(); lastTuneTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getLastTuneTimeBuilder() { bitField0_ |= 0x00000200; onChanged(); return getLastTuneTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { if (lastTuneTimeBuilder_ != null) { return lastTuneTimeBuilder_.getMessageOrBuilder(); } else { return lastTuneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastTuneTime_; } } /** * * *
     * Output only. The timestamp when the latest successful tune finished.
     * 
* * * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getLastTuneTimeFieldBuilder() { if (lastTuneTimeBuilder_ == null) { lastTuneTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getLastTuneTime(), getParentForChildren(), isClean()); lastTuneTime_ = null; } return lastTuneTimeBuilder_; } private java.lang.Object tuningOperation_ = ""; /** * * *
     * Output only. The tune operation associated with the model.
     *
     * Can be used to determine if there is an ongoing tune for this
     * recommendation. Empty field implies no tune is goig on.
     * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The tuningOperation. */ public java.lang.String getTuningOperation() { java.lang.Object ref = tuningOperation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tuningOperation_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The tune operation associated with the model.
     *
     * Can be used to determine if there is an ongoing tune for this
     * recommendation. Empty field implies no tune is goig on.
     * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for tuningOperation. */ public com.google.protobuf.ByteString getTuningOperationBytes() { java.lang.Object ref = tuningOperation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tuningOperation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The tune operation associated with the model.
     *
     * Can be used to determine if there is an ongoing tune for this
     * recommendation. Empty field implies no tune is goig on.
     * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The tuningOperation to set. * @return This builder for chaining. */ public Builder setTuningOperation(java.lang.String value) { if (value == null) { throw new NullPointerException(); } tuningOperation_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * Output only. The tune operation associated with the model.
     *
     * Can be used to determine if there is an ongoing tune for this
     * recommendation. Empty field implies no tune is goig on.
     * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearTuningOperation() { tuningOperation_ = getDefaultInstance().getTuningOperation(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** * * *
     * Output only. The tune operation associated with the model.
     *
     * Can be used to determine if there is an ongoing tune for this
     * recommendation. Empty field implies no tune is goig on.
     * 
* * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for tuningOperation to set. * @return This builder for chaining. */ public Builder setTuningOperationBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); tuningOperation_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } private int dataState_ = 0; /** * * *
     * Output only. The state of data requirements for this model: `DATA_OK` and
     * `DATA_ERROR`.
     *
     * Recommendation model cannot be trained if the data is in
     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
     * if serving state is `ACTIVE`: models were trained successfully before, but
     * cannot be refreshed because model no longer has sufficient
     * data for training.
     * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for dataState. */ @java.lang.Override public int getDataStateValue() { return dataState_; } /** * * *
     * Output only. The state of data requirements for this model: `DATA_OK` and
     * `DATA_ERROR`.
     *
     * Recommendation model cannot be trained if the data is in
     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
     * if serving state is `ACTIVE`: models were trained successfully before, but
     * cannot be refreshed because model no longer has sufficient
     * data for training.
     * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The enum numeric value on the wire for dataState to set. * @return This builder for chaining. */ public Builder setDataStateValue(int value) { dataState_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Output only. The state of data requirements for this model: `DATA_OK` and
     * `DATA_ERROR`.
     *
     * Recommendation model cannot be trained if the data is in
     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
     * if serving state is `ACTIVE`: models were trained successfully before, but
     * cannot be refreshed because model no longer has sufficient
     * data for training.
     * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The dataState. */ @java.lang.Override public com.google.cloud.retail.v2beta.Model.DataState getDataState() { com.google.cloud.retail.v2beta.Model.DataState result = com.google.cloud.retail.v2beta.Model.DataState.forNumber(dataState_); return result == null ? com.google.cloud.retail.v2beta.Model.DataState.UNRECOGNIZED : result; } /** * * *
     * Output only. The state of data requirements for this model: `DATA_OK` and
     * `DATA_ERROR`.
     *
     * Recommendation model cannot be trained if the data is in
     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
     * if serving state is `ACTIVE`: models were trained successfully before, but
     * cannot be refreshed because model no longer has sufficient
     * data for training.
     * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The dataState to set. * @return This builder for chaining. */ public Builder setDataState(com.google.cloud.retail.v2beta.Model.DataState value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000800; dataState_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Output only. The state of data requirements for this model: `DATA_OK` and
     * `DATA_ERROR`.
     *
     * Recommendation model cannot be trained if the data is in
     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
     * if serving state is `ACTIVE`: models were trained successfully before, but
     * cannot be refreshed because model no longer has sufficient
     * data for training.
     * 
* * * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearDataState() { bitField0_ = (bitField0_ & ~0x00000800); dataState_ = 0; onChanged(); return this; } private int filteringOption_ = 0; /** * * *
     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
     * by attributes is enabled for the model.
     * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for filteringOption. */ @java.lang.Override public int getFilteringOptionValue() { return filteringOption_; } /** * * *
     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
     * by attributes is enabled for the model.
     * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for filteringOption to set. * @return This builder for chaining. */ public Builder setFilteringOptionValue(int value) { filteringOption_ = value; bitField0_ |= 0x00001000; onChanged(); return this; } /** * * *
     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
     * by attributes is enabled for the model.
     * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The filteringOption. */ @java.lang.Override public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getFilteringOption() { com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = com.google.cloud.retail.v2beta.RecommendationsFilteringOption.forNumber(filteringOption_); return result == null ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED : result; } /** * * *
     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
     * by attributes is enabled for the model.
     * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The filteringOption to set. * @return This builder for chaining. */ public Builder setFilteringOption( com.google.cloud.retail.v2beta.RecommendationsFilteringOption value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00001000; filteringOption_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
     * by attributes is enabled for the model.
     * 
* * * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearFilteringOption() { bitField0_ = (bitField0_ & ~0x00001000); filteringOption_ = 0; onChanged(); return this; } private java.util.List servingConfigLists_ = java.util.Collections.emptyList(); private void ensureServingConfigListsIsMutable() { if (!((bitField0_ & 0x00002000) != 0)) { servingConfigLists_ = new java.util.ArrayList( servingConfigLists_); bitField0_ |= 0x00002000; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.retail.v2beta.Model.ServingConfigList, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder> servingConfigListsBuilder_; /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServingConfigListsList() { if (servingConfigListsBuilder_ == null) { return java.util.Collections.unmodifiableList(servingConfigLists_); } else { return servingConfigListsBuilder_.getMessageList(); } } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public int getServingConfigListsCount() { if (servingConfigListsBuilder_ == null) { return servingConfigLists_.size(); } else { return servingConfigListsBuilder_.getCount(); } } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLists(int index) { if (servingConfigListsBuilder_ == null) { return servingConfigLists_.get(index); } else { return servingConfigListsBuilder_.getMessage(index); } } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setServingConfigLists( int index, com.google.cloud.retail.v2beta.Model.ServingConfigList value) { if (servingConfigListsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServingConfigListsIsMutable(); servingConfigLists_.set(index, value); onChanged(); } else { servingConfigListsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setServingConfigLists( int index, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); servingConfigLists_.set(index, builderForValue.build()); onChanged(); } else { servingConfigListsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServingConfigLists( com.google.cloud.retail.v2beta.Model.ServingConfigList value) { if (servingConfigListsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServingConfigListsIsMutable(); servingConfigLists_.add(value); onChanged(); } else { servingConfigListsBuilder_.addMessage(value); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServingConfigLists( int index, com.google.cloud.retail.v2beta.Model.ServingConfigList value) { if (servingConfigListsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServingConfigListsIsMutable(); servingConfigLists_.add(index, value); onChanged(); } else { servingConfigListsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServingConfigLists( com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); servingConfigLists_.add(builderForValue.build()); onChanged(); } else { servingConfigListsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServingConfigLists( int index, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); servingConfigLists_.add(index, builderForValue.build()); onChanged(); } else { servingConfigListsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAllServingConfigLists( java.lang.Iterable values) { if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigLists_); onChanged(); } else { servingConfigListsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearServingConfigLists() { if (servingConfigListsBuilder_ == null) { servingConfigLists_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00002000); onChanged(); } else { servingConfigListsBuilder_.clear(); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeServingConfigLists(int index) { if (servingConfigListsBuilder_ == null) { ensureServingConfigListsIsMutable(); servingConfigLists_.remove(index); onChanged(); } else { servingConfigListsBuilder_.remove(index); } return this; } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder getServingConfigListsBuilder(int index) { return getServingConfigListsFieldBuilder().getBuilder(index); } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder(int index) { if (servingConfigListsBuilder_ == null) { return servingConfigLists_.get(index); } else { return servingConfigListsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServingConfigListsOrBuilderList() { if (servingConfigListsBuilder_ != null) { return servingConfigListsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(servingConfigLists_); } } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder addServingConfigListsBuilder() { return getServingConfigListsFieldBuilder() .addBuilder(com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()); } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder addServingConfigListsBuilder(int index) { return getServingConfigListsFieldBuilder() .addBuilder( index, com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()); } /** * * *
     * Output only. The list of valid serving configs associated with the
     * PageOptimizationConfig.
     * 
* * * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServingConfigListsBuilderList() { return getServingConfigListsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.retail.v2beta.Model.ServingConfigList, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder> getServingConfigListsFieldBuilder() { if (servingConfigListsBuilder_ == null) { servingConfigListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.retail.v2beta.Model.ServingConfigList, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder>( servingConfigLists_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); servingConfigLists_ = null; } return servingConfigListsBuilder_; } @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.retail.v2beta.Model) } // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model) private static final com.google.cloud.retail.v2beta.Model DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model(); } public static com.google.cloud.retail.v2beta.Model getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Model 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.retail.v2beta.Model getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy