1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/retail/v2/common.proto 18 19 package com.google.cloud.retail.v2; 20 21 public interface CustomAttributeOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CustomAttribute) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * The textual values of this custom attribute. For example, `["yellow", 31 * "green"]` when the key is "color". 32 * Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is 33 * returned. 34 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 35 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 36 * Otherwise, an INVALID_ARGUMENT error is returned. 37 * </pre> 38 * 39 * <code>repeated string text = 1;</code> 40 * 41 * @return A list containing the text. 42 */ getTextList()43 java.util.List<java.lang.String> getTextList(); 44 /** 45 * 46 * 47 * <pre> 48 * The textual values of this custom attribute. For example, `["yellow", 49 * "green"]` when the key is "color". 50 * Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is 51 * returned. 52 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 53 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 54 * Otherwise, an INVALID_ARGUMENT error is returned. 55 * </pre> 56 * 57 * <code>repeated string text = 1;</code> 58 * 59 * @return The count of text. 60 */ getTextCount()61 int getTextCount(); 62 /** 63 * 64 * 65 * <pre> 66 * The textual values of this custom attribute. For example, `["yellow", 67 * "green"]` when the key is "color". 68 * Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is 69 * returned. 70 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 71 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 72 * Otherwise, an INVALID_ARGUMENT error is returned. 73 * </pre> 74 * 75 * <code>repeated string text = 1;</code> 76 * 77 * @param index The index of the element to return. 78 * @return The text at the given index. 79 */ getText(int index)80 java.lang.String getText(int index); 81 /** 82 * 83 * 84 * <pre> 85 * The textual values of this custom attribute. For example, `["yellow", 86 * "green"]` when the key is "color". 87 * Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is 88 * returned. 89 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 90 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 91 * Otherwise, an INVALID_ARGUMENT error is returned. 92 * </pre> 93 * 94 * <code>repeated string text = 1;</code> 95 * 96 * @param index The index of the value to return. 97 * @return The bytes of the text at the given index. 98 */ getTextBytes(int index)99 com.google.protobuf.ByteString getTextBytes(int index); 100 101 /** 102 * 103 * 104 * <pre> 105 * The numerical values of this custom attribute. For example, `[2.3, 15.4]` 106 * when the key is "lengths_cm". 107 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 108 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 109 * Otherwise, an INVALID_ARGUMENT error is returned. 110 * </pre> 111 * 112 * <code>repeated double numbers = 2;</code> 113 * 114 * @return A list containing the numbers. 115 */ getNumbersList()116 java.util.List<java.lang.Double> getNumbersList(); 117 /** 118 * 119 * 120 * <pre> 121 * The numerical values of this custom attribute. For example, `[2.3, 15.4]` 122 * when the key is "lengths_cm". 123 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 124 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 125 * Otherwise, an INVALID_ARGUMENT error is returned. 126 * </pre> 127 * 128 * <code>repeated double numbers = 2;</code> 129 * 130 * @return The count of numbers. 131 */ getNumbersCount()132 int getNumbersCount(); 133 /** 134 * 135 * 136 * <pre> 137 * The numerical values of this custom attribute. For example, `[2.3, 15.4]` 138 * when the key is "lengths_cm". 139 * Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or 140 * [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. 141 * Otherwise, an INVALID_ARGUMENT error is returned. 142 * </pre> 143 * 144 * <code>repeated double numbers = 2;</code> 145 * 146 * @param index The index of the element to return. 147 * @return The numbers at the given index. 148 */ getNumbers(int index)149 double getNumbers(int index); 150 151 /** 152 * 153 * 154 * <pre> 155 * This field is normally ignored unless 156 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] 157 * of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 158 * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level 159 * attribute configuration, see [Configuration 160 * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). 161 * If true, custom attribute values are searchable by text queries in 162 * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. 163 * This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent]. 164 * Only set if type [text][google.cloud.retail.v2.CustomAttribute.text] is 165 * set. Otherwise, a INVALID_ARGUMENT error is returned. 166 * </pre> 167 * 168 * <code>optional bool searchable = 3 [deprecated = true];</code> 169 * 170 * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See 171 * google/cloud/retail/v2/common.proto;l=423 172 * @return Whether the searchable field is set. 173 */ 174 @java.lang.Deprecated hasSearchable()175 boolean hasSearchable(); 176 /** 177 * 178 * 179 * <pre> 180 * This field is normally ignored unless 181 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] 182 * of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 183 * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level 184 * attribute configuration, see [Configuration 185 * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). 186 * If true, custom attribute values are searchable by text queries in 187 * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. 188 * This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent]. 189 * Only set if type [text][google.cloud.retail.v2.CustomAttribute.text] is 190 * set. Otherwise, a INVALID_ARGUMENT error is returned. 191 * </pre> 192 * 193 * <code>optional bool searchable = 3 [deprecated = true];</code> 194 * 195 * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See 196 * google/cloud/retail/v2/common.proto;l=423 197 * @return The searchable. 198 */ 199 @java.lang.Deprecated getSearchable()200 boolean getSearchable(); 201 202 /** 203 * 204 * 205 * <pre> 206 * This field is normally ignored unless 207 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] 208 * of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 209 * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level 210 * attribute configuration, see [Configuration 211 * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). 212 * If true, custom attribute values are indexed, so that they can be filtered, 213 * faceted or boosted in 214 * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. 215 * This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent]. 216 * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter], 217 * [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] 218 * and 219 * [SearchRequest.boost_spec][google.cloud.retail.v2.SearchRequest.boost_spec] 220 * for more details. 221 * </pre> 222 * 223 * <code>optional bool indexable = 4 [deprecated = true];</code> 224 * 225 * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See 226 * google/cloud/retail/v2/common.proto;l=442 227 * @return Whether the indexable field is set. 228 */ 229 @java.lang.Deprecated hasIndexable()230 boolean hasIndexable(); 231 /** 232 * 233 * 234 * <pre> 235 * This field is normally ignored unless 236 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] 237 * of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 238 * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level 239 * attribute configuration, see [Configuration 240 * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). 241 * If true, custom attribute values are indexed, so that they can be filtered, 242 * faceted or boosted in 243 * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. 244 * This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent]. 245 * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter], 246 * [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] 247 * and 248 * [SearchRequest.boost_spec][google.cloud.retail.v2.SearchRequest.boost_spec] 249 * for more details. 250 * </pre> 251 * 252 * <code>optional bool indexable = 4 [deprecated = true];</code> 253 * 254 * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See 255 * google/cloud/retail/v2/common.proto;l=442 256 * @return The indexable. 257 */ 258 @java.lang.Deprecated getIndexable()259 boolean getIndexable(); 260 } 261