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/prediction_service.proto 18 19 package com.google.cloud.retail.v2; 20 21 public interface PredictRequestOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.PredictRequest) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Required. Full resource name of the format: 31 * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` 32 * or 33 * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. 34 * We recommend using the `servingConfigs` resource. `placements` is a legacy 35 * resource. 36 * The ID of the Recommendations AI serving config or placement. 37 * Before you can request predictions from your model, you must create at 38 * least one serving config or placement for it. For more information, see 39 * [Manage serving configs] 40 * (https://cloud.google.com/retail/docs/manage-configs). 41 * The full list of available serving configs can be seen at 42 * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs 43 * </pre> 44 * 45 * <code>string placement = 1 [(.google.api.field_behavior) = REQUIRED];</code> 46 * 47 * @return The placement. 48 */ getPlacement()49 java.lang.String getPlacement(); 50 /** 51 * 52 * 53 * <pre> 54 * Required. Full resource name of the format: 55 * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` 56 * or 57 * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. 58 * We recommend using the `servingConfigs` resource. `placements` is a legacy 59 * resource. 60 * The ID of the Recommendations AI serving config or placement. 61 * Before you can request predictions from your model, you must create at 62 * least one serving config or placement for it. For more information, see 63 * [Manage serving configs] 64 * (https://cloud.google.com/retail/docs/manage-configs). 65 * The full list of available serving configs can be seen at 66 * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs 67 * </pre> 68 * 69 * <code>string placement = 1 [(.google.api.field_behavior) = REQUIRED];</code> 70 * 71 * @return The bytes for placement. 72 */ getPlacementBytes()73 com.google.protobuf.ByteString getPlacementBytes(); 74 75 /** 76 * 77 * 78 * <pre> 79 * Required. Context about the user, what they are looking at and what action 80 * they took to trigger the predict request. Note that this user event detail 81 * won't be ingested to userEvent logs. Thus, a separate userEvent write 82 * request is required for event logging. 83 * Don't set 84 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] or 85 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] to the same 86 * fixed ID for different users. If you are trying to receive non-personalized 87 * recommendations (not recommended; this can negatively impact model 88 * performance), instead set 89 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] to a 90 * random unique ID and leave 91 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] unset. 92 * </pre> 93 * 94 * <code> 95 * .google.cloud.retail.v2.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; 96 * </code> 97 * 98 * @return Whether the userEvent field is set. 99 */ hasUserEvent()100 boolean hasUserEvent(); 101 /** 102 * 103 * 104 * <pre> 105 * Required. Context about the user, what they are looking at and what action 106 * they took to trigger the predict request. Note that this user event detail 107 * won't be ingested to userEvent logs. Thus, a separate userEvent write 108 * request is required for event logging. 109 * Don't set 110 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] or 111 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] to the same 112 * fixed ID for different users. If you are trying to receive non-personalized 113 * recommendations (not recommended; this can negatively impact model 114 * performance), instead set 115 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] to a 116 * random unique ID and leave 117 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] unset. 118 * </pre> 119 * 120 * <code> 121 * .google.cloud.retail.v2.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; 122 * </code> 123 * 124 * @return The userEvent. 125 */ getUserEvent()126 com.google.cloud.retail.v2.UserEvent getUserEvent(); 127 /** 128 * 129 * 130 * <pre> 131 * Required. Context about the user, what they are looking at and what action 132 * they took to trigger the predict request. Note that this user event detail 133 * won't be ingested to userEvent logs. Thus, a separate userEvent write 134 * request is required for event logging. 135 * Don't set 136 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] or 137 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] to the same 138 * fixed ID for different users. If you are trying to receive non-personalized 139 * recommendations (not recommended; this can negatively impact model 140 * performance), instead set 141 * [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] to a 142 * random unique ID and leave 143 * [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] unset. 144 * </pre> 145 * 146 * <code> 147 * .google.cloud.retail.v2.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; 148 * </code> 149 */ getUserEventOrBuilder()150 com.google.cloud.retail.v2.UserEventOrBuilder getUserEventOrBuilder(); 151 152 /** 153 * 154 * 155 * <pre> 156 * Maximum number of results to return. Set this property to the number of 157 * prediction results needed. If zero, the service will choose a reasonable 158 * default. The maximum allowed value is 100. Values above 100 will be coerced 159 * to 100. 160 * </pre> 161 * 162 * <code>int32 page_size = 3;</code> 163 * 164 * @return The pageSize. 165 */ getPageSize()166 int getPageSize(); 167 168 /** 169 * 170 * 171 * <pre> 172 * This field is not used; leave it unset. 173 * </pre> 174 * 175 * <code>string page_token = 4 [deprecated = true];</code> 176 * 177 * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See 178 * google/cloud/retail/v2/prediction_service.proto;l=94 179 * @return The pageToken. 180 */ 181 @java.lang.Deprecated getPageToken()182 java.lang.String getPageToken(); 183 /** 184 * 185 * 186 * <pre> 187 * This field is not used; leave it unset. 188 * </pre> 189 * 190 * <code>string page_token = 4 [deprecated = true];</code> 191 * 192 * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See 193 * google/cloud/retail/v2/prediction_service.proto;l=94 194 * @return The bytes for pageToken. 195 */ 196 @java.lang.Deprecated getPageTokenBytes()197 com.google.protobuf.ByteString getPageTokenBytes(); 198 199 /** 200 * 201 * 202 * <pre> 203 * Filter for restricting prediction results with a length limit of 5,000 204 * characters. Accepts values for tags and the `filterOutOfStockItems` flag. 205 * * Tag expressions. Restricts predictions to products that match all of the 206 * specified tags. Boolean operators `OR` and `NOT` are supported if the 207 * expression is enclosed in parentheses, and must be separated from the 208 * tag values by a space. `-"tagA"` is also supported and is equivalent to 209 * `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings 210 * with a size limit of 1,000 characters. 211 * Note: "Recently viewed" models don't support tag filtering at the 212 * moment. 213 * * filterOutOfStockItems. Restricts predictions to products that do not 214 * have a 215 * stockState value of OUT_OF_STOCK. 216 * Examples: 217 * * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") 218 * * filterOutOfStockItems tag=(-"promotional") 219 * * filterOutOfStockItems 220 * If your filter blocks all prediction results, the API will return *no* 221 * results. If instead you want empty result sets to return generic 222 * (unfiltered) popular products, set `strictFiltering` to False in 223 * `PredictRequest.params`. Note that the API will never return items with 224 * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. 225 * If `filterSyntaxV2` is set to true under the `params` field, then 226 * attribute-based expressions are expected instead of the above described 227 * tag-based syntax. Examples: 228 * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) 229 * * (availability: ANY("IN_STOCK")) AND 230 * (colors: ANY("Red") OR categories: ANY("Phones")) 231 * For more information, see 232 * [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs). 233 * </pre> 234 * 235 * <code>string filter = 5;</code> 236 * 237 * @return The filter. 238 */ getFilter()239 java.lang.String getFilter(); 240 /** 241 * 242 * 243 * <pre> 244 * Filter for restricting prediction results with a length limit of 5,000 245 * characters. Accepts values for tags and the `filterOutOfStockItems` flag. 246 * * Tag expressions. Restricts predictions to products that match all of the 247 * specified tags. Boolean operators `OR` and `NOT` are supported if the 248 * expression is enclosed in parentheses, and must be separated from the 249 * tag values by a space. `-"tagA"` is also supported and is equivalent to 250 * `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings 251 * with a size limit of 1,000 characters. 252 * Note: "Recently viewed" models don't support tag filtering at the 253 * moment. 254 * * filterOutOfStockItems. Restricts predictions to products that do not 255 * have a 256 * stockState value of OUT_OF_STOCK. 257 * Examples: 258 * * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") 259 * * filterOutOfStockItems tag=(-"promotional") 260 * * filterOutOfStockItems 261 * If your filter blocks all prediction results, the API will return *no* 262 * results. If instead you want empty result sets to return generic 263 * (unfiltered) popular products, set `strictFiltering` to False in 264 * `PredictRequest.params`. Note that the API will never return items with 265 * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. 266 * If `filterSyntaxV2` is set to true under the `params` field, then 267 * attribute-based expressions are expected instead of the above described 268 * tag-based syntax. Examples: 269 * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) 270 * * (availability: ANY("IN_STOCK")) AND 271 * (colors: ANY("Red") OR categories: ANY("Phones")) 272 * For more information, see 273 * [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs). 274 * </pre> 275 * 276 * <code>string filter = 5;</code> 277 * 278 * @return The bytes for filter. 279 */ getFilterBytes()280 com.google.protobuf.ByteString getFilterBytes(); 281 282 /** 283 * 284 * 285 * <pre> 286 * Use validate only mode for this prediction query. If set to true, a 287 * dummy model will be used that returns arbitrary products. 288 * Note that the validate only mode should only be used for testing the API, 289 * or if the model is not ready. 290 * </pre> 291 * 292 * <code>bool validate_only = 6;</code> 293 * 294 * @return The validateOnly. 295 */ getValidateOnly()296 boolean getValidateOnly(); 297 298 /** 299 * 300 * 301 * <pre> 302 * Additional domain specific parameters for the predictions. 303 * Allowed values: 304 * * `returnProduct`: Boolean. If set to true, the associated product 305 * object will be returned in the `results.metadata` field in the 306 * prediction response. 307 * * `returnScore`: Boolean. If set to true, the prediction 'score' 308 * corresponding to each returned product will be set in the 309 * `results.metadata` field in the prediction response. The given 310 * 'score' indicates the probability of a product being clicked/purchased 311 * given the user's context and history. 312 * * `strictFiltering`: Boolean. True by default. If set to false, the service 313 * will return generic (unfiltered) popular products instead of empty if 314 * your filter blocks all prediction results. 315 * * `priceRerankLevel`: String. Default empty. If set to be non-empty, then 316 * it needs to be one of {'no-price-reranking', 'low-price-reranking', 317 * 'medium-price-reranking', 'high-price-reranking'}. This gives 318 * request-level control and adjusts prediction results based on product 319 * price. 320 * * `diversityLevel`: String. Default empty. If set to be non-empty, then 321 * it needs to be one of {'no-diversity', 'low-diversity', 322 * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives 323 * request-level control and adjusts prediction results based on product 324 * category. 325 * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` 326 * field is interpreteted according to the new, attribute-based syntax. 327 * </pre> 328 * 329 * <code>map<string, .google.protobuf.Value> params = 7;</code> 330 */ getParamsCount()331 int getParamsCount(); 332 /** 333 * 334 * 335 * <pre> 336 * Additional domain specific parameters for the predictions. 337 * Allowed values: 338 * * `returnProduct`: Boolean. If set to true, the associated product 339 * object will be returned in the `results.metadata` field in the 340 * prediction response. 341 * * `returnScore`: Boolean. If set to true, the prediction 'score' 342 * corresponding to each returned product will be set in the 343 * `results.metadata` field in the prediction response. The given 344 * 'score' indicates the probability of a product being clicked/purchased 345 * given the user's context and history. 346 * * `strictFiltering`: Boolean. True by default. If set to false, the service 347 * will return generic (unfiltered) popular products instead of empty if 348 * your filter blocks all prediction results. 349 * * `priceRerankLevel`: String. Default empty. If set to be non-empty, then 350 * it needs to be one of {'no-price-reranking', 'low-price-reranking', 351 * 'medium-price-reranking', 'high-price-reranking'}. This gives 352 * request-level control and adjusts prediction results based on product 353 * price. 354 * * `diversityLevel`: String. Default empty. If set to be non-empty, then 355 * it needs to be one of {'no-diversity', 'low-diversity', 356 * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives 357 * request-level control and adjusts prediction results based on product 358 * category. 359 * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` 360 * field is interpreteted according to the new, attribute-based syntax. 361 * </pre> 362 * 363 * <code>map<string, .google.protobuf.Value> params = 7;</code> 364 */ containsParams(java.lang.String key)365 boolean containsParams(java.lang.String key); 366 /** Use {@link #getParamsMap()} instead. */ 367 @java.lang.Deprecated getParams()368 java.util.Map<java.lang.String, com.google.protobuf.Value> getParams(); 369 /** 370 * 371 * 372 * <pre> 373 * Additional domain specific parameters for the predictions. 374 * Allowed values: 375 * * `returnProduct`: Boolean. If set to true, the associated product 376 * object will be returned in the `results.metadata` field in the 377 * prediction response. 378 * * `returnScore`: Boolean. If set to true, the prediction 'score' 379 * corresponding to each returned product will be set in the 380 * `results.metadata` field in the prediction response. The given 381 * 'score' indicates the probability of a product being clicked/purchased 382 * given the user's context and history. 383 * * `strictFiltering`: Boolean. True by default. If set to false, the service 384 * will return generic (unfiltered) popular products instead of empty if 385 * your filter blocks all prediction results. 386 * * `priceRerankLevel`: String. Default empty. If set to be non-empty, then 387 * it needs to be one of {'no-price-reranking', 'low-price-reranking', 388 * 'medium-price-reranking', 'high-price-reranking'}. This gives 389 * request-level control and adjusts prediction results based on product 390 * price. 391 * * `diversityLevel`: String. Default empty. If set to be non-empty, then 392 * it needs to be one of {'no-diversity', 'low-diversity', 393 * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives 394 * request-level control and adjusts prediction results based on product 395 * category. 396 * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` 397 * field is interpreteted according to the new, attribute-based syntax. 398 * </pre> 399 * 400 * <code>map<string, .google.protobuf.Value> params = 7;</code> 401 */ getParamsMap()402 java.util.Map<java.lang.String, com.google.protobuf.Value> getParamsMap(); 403 /** 404 * 405 * 406 * <pre> 407 * Additional domain specific parameters for the predictions. 408 * Allowed values: 409 * * `returnProduct`: Boolean. If set to true, the associated product 410 * object will be returned in the `results.metadata` field in the 411 * prediction response. 412 * * `returnScore`: Boolean. If set to true, the prediction 'score' 413 * corresponding to each returned product will be set in the 414 * `results.metadata` field in the prediction response. The given 415 * 'score' indicates the probability of a product being clicked/purchased 416 * given the user's context and history. 417 * * `strictFiltering`: Boolean. True by default. If set to false, the service 418 * will return generic (unfiltered) popular products instead of empty if 419 * your filter blocks all prediction results. 420 * * `priceRerankLevel`: String. Default empty. If set to be non-empty, then 421 * it needs to be one of {'no-price-reranking', 'low-price-reranking', 422 * 'medium-price-reranking', 'high-price-reranking'}. This gives 423 * request-level control and adjusts prediction results based on product 424 * price. 425 * * `diversityLevel`: String. Default empty. If set to be non-empty, then 426 * it needs to be one of {'no-diversity', 'low-diversity', 427 * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives 428 * request-level control and adjusts prediction results based on product 429 * category. 430 * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` 431 * field is interpreteted according to the new, attribute-based syntax. 432 * </pre> 433 * 434 * <code>map<string, .google.protobuf.Value> params = 7;</code> 435 */ 436 /* nullable */ getParamsOrDefault( java.lang.String key, com.google.protobuf.Value defaultValue)437 com.google.protobuf.Value getParamsOrDefault( 438 java.lang.String key, 439 /* nullable */ 440 com.google.protobuf.Value defaultValue); 441 /** 442 * 443 * 444 * <pre> 445 * Additional domain specific parameters for the predictions. 446 * Allowed values: 447 * * `returnProduct`: Boolean. If set to true, the associated product 448 * object will be returned in the `results.metadata` field in the 449 * prediction response. 450 * * `returnScore`: Boolean. If set to true, the prediction 'score' 451 * corresponding to each returned product will be set in the 452 * `results.metadata` field in the prediction response. The given 453 * 'score' indicates the probability of a product being clicked/purchased 454 * given the user's context and history. 455 * * `strictFiltering`: Boolean. True by default. If set to false, the service 456 * will return generic (unfiltered) popular products instead of empty if 457 * your filter blocks all prediction results. 458 * * `priceRerankLevel`: String. Default empty. If set to be non-empty, then 459 * it needs to be one of {'no-price-reranking', 'low-price-reranking', 460 * 'medium-price-reranking', 'high-price-reranking'}. This gives 461 * request-level control and adjusts prediction results based on product 462 * price. 463 * * `diversityLevel`: String. Default empty. If set to be non-empty, then 464 * it needs to be one of {'no-diversity', 'low-diversity', 465 * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives 466 * request-level control and adjusts prediction results based on product 467 * category. 468 * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` 469 * field is interpreteted according to the new, attribute-based syntax. 470 * </pre> 471 * 472 * <code>map<string, .google.protobuf.Value> params = 7;</code> 473 */ getParamsOrThrow(java.lang.String key)474 com.google.protobuf.Value getParamsOrThrow(java.lang.String key); 475 476 /** 477 * 478 * 479 * <pre> 480 * The labels applied to a resource must meet the following requirements: 481 * * Each resource can have multiple labels, up to a maximum of 64. 482 * * Each label must be a key-value pair. 483 * * Keys have a minimum length of 1 character and a maximum length of 63 484 * characters and cannot be empty. Values can be empty and have a maximum 485 * length of 63 characters. 486 * * Keys and values can contain only lowercase letters, numeric characters, 487 * underscores, and dashes. All characters must use UTF-8 encoding, and 488 * international characters are allowed. 489 * * The key portion of a label must be unique. However, you can use the same 490 * key with multiple resources. 491 * * Keys must start with a lowercase letter or international character. 492 * See [Google Cloud 493 * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) 494 * for more details. 495 * </pre> 496 * 497 * <code>map<string, string> labels = 8;</code> 498 */ getLabelsCount()499 int getLabelsCount(); 500 /** 501 * 502 * 503 * <pre> 504 * The labels applied to a resource must meet the following requirements: 505 * * Each resource can have multiple labels, up to a maximum of 64. 506 * * Each label must be a key-value pair. 507 * * Keys have a minimum length of 1 character and a maximum length of 63 508 * characters and cannot be empty. Values can be empty and have a maximum 509 * length of 63 characters. 510 * * Keys and values can contain only lowercase letters, numeric characters, 511 * underscores, and dashes. All characters must use UTF-8 encoding, and 512 * international characters are allowed. 513 * * The key portion of a label must be unique. However, you can use the same 514 * key with multiple resources. 515 * * Keys must start with a lowercase letter or international character. 516 * See [Google Cloud 517 * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) 518 * for more details. 519 * </pre> 520 * 521 * <code>map<string, string> labels = 8;</code> 522 */ containsLabels(java.lang.String key)523 boolean containsLabels(java.lang.String key); 524 /** Use {@link #getLabelsMap()} instead. */ 525 @java.lang.Deprecated getLabels()526 java.util.Map<java.lang.String, java.lang.String> getLabels(); 527 /** 528 * 529 * 530 * <pre> 531 * The labels applied to a resource must meet the following requirements: 532 * * Each resource can have multiple labels, up to a maximum of 64. 533 * * Each label must be a key-value pair. 534 * * Keys have a minimum length of 1 character and a maximum length of 63 535 * characters and cannot be empty. Values can be empty and have a maximum 536 * length of 63 characters. 537 * * Keys and values can contain only lowercase letters, numeric characters, 538 * underscores, and dashes. All characters must use UTF-8 encoding, and 539 * international characters are allowed. 540 * * The key portion of a label must be unique. However, you can use the same 541 * key with multiple resources. 542 * * Keys must start with a lowercase letter or international character. 543 * See [Google Cloud 544 * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) 545 * for more details. 546 * </pre> 547 * 548 * <code>map<string, string> labels = 8;</code> 549 */ getLabelsMap()550 java.util.Map<java.lang.String, java.lang.String> getLabelsMap(); 551 /** 552 * 553 * 554 * <pre> 555 * The labels applied to a resource must meet the following requirements: 556 * * Each resource can have multiple labels, up to a maximum of 64. 557 * * Each label must be a key-value pair. 558 * * Keys have a minimum length of 1 character and a maximum length of 63 559 * characters and cannot be empty. Values can be empty and have a maximum 560 * length of 63 characters. 561 * * Keys and values can contain only lowercase letters, numeric characters, 562 * underscores, and dashes. All characters must use UTF-8 encoding, and 563 * international characters are allowed. 564 * * The key portion of a label must be unique. However, you can use the same 565 * key with multiple resources. 566 * * Keys must start with a lowercase letter or international character. 567 * See [Google Cloud 568 * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) 569 * for more details. 570 * </pre> 571 * 572 * <code>map<string, string> labels = 8;</code> 573 */ 574 /* nullable */ getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)575 java.lang.String getLabelsOrDefault( 576 java.lang.String key, 577 /* nullable */ 578 java.lang.String defaultValue); 579 /** 580 * 581 * 582 * <pre> 583 * The labels applied to a resource must meet the following requirements: 584 * * Each resource can have multiple labels, up to a maximum of 64. 585 * * Each label must be a key-value pair. 586 * * Keys have a minimum length of 1 character and a maximum length of 63 587 * characters and cannot be empty. Values can be empty and have a maximum 588 * length of 63 characters. 589 * * Keys and values can contain only lowercase letters, numeric characters, 590 * underscores, and dashes. All characters must use UTF-8 encoding, and 591 * international characters are allowed. 592 * * The key portion of a label must be unique. However, you can use the same 593 * key with multiple resources. 594 * * Keys must start with a lowercase letter or international character. 595 * See [Google Cloud 596 * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) 597 * for more details. 598 * </pre> 599 * 600 * <code>map<string, string> labels = 8;</code> 601 */ getLabelsOrThrow(java.lang.String key)602 java.lang.String getLabelsOrThrow(java.lang.String key); 603 } 604