|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.retail.v2alpha.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Pins one or more specified products to a specific position in the results. * Rule Condition: Must |
| 21 | + * specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for |
| 22 | + * browse only), but can't specify both. * Action Input: mapping of `[pin_position, product_id]` |
| 23 | + * pairs (pin position uses 1-based indexing). * Action Result: Will pin products with matching ids |
| 24 | + * to the position specified in the final result order. Example: Suppose the query is `shoes`, the |
| 25 | + * Condition.query_terms is `shoes` and the pin_map has `{1, "pid1"}`, then product with `pid1` will |
| 26 | + * be pinned to the top position in the final results. If multiple PinActions are matched to a |
| 27 | + * single request the actions will be processed from most to least recently updated. Pins to |
| 28 | + * positions larger than the max allowed page size of 120 are not allowed. |
| 29 | + * |
| 30 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 31 | + * transmitted over HTTP when working with the Vertex AI Search for Retail API. For a detailed |
| 32 | + * explanation see: |
| 33 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 34 | + * </p> |
| 35 | + * |
| 36 | + * @author Google, Inc. |
| 37 | + */ |
| 38 | +@SuppressWarnings("javadoc") |
| 39 | +public final class GoogleCloudRetailV2alphaRulePinAction extends com.google.api.client.json.GenericJson { |
| 40 | + |
| 41 | + /** |
| 42 | + * Required. A map of positions to product_ids. Partial matches per action are allowed, if a |
| 43 | + * certain position in the map is already filled that `[position, product_id]` pair will be |
| 44 | + * ignored but the rest may still be applied. This case will only occur if multiple pin actions |
| 45 | + * are matched to a single request, as the map guarantees that pin positions are unique within the |
| 46 | + * same action. Duplicate product_ids are not permitted within a single pin map. The max size of |
| 47 | + * this map is 120, equivalent to the max [request page size](https://cloud.google.com/retail/docs |
| 48 | + * /reference/rest/v2/projects.locations.catalogs.placements/search#request-body). |
| 49 | + * The value may be {@code null}. |
| 50 | + */ |
| 51 | + @com.google.api.client.util.Key |
| 52 | + private java.util.Map<String, java.lang.String> pinMap; |
| 53 | + |
| 54 | + /** |
| 55 | + * Required. A map of positions to product_ids. Partial matches per action are allowed, if a |
| 56 | + * certain position in the map is already filled that `[position, product_id]` pair will be |
| 57 | + * ignored but the rest may still be applied. This case will only occur if multiple pin actions |
| 58 | + * are matched to a single request, as the map guarantees that pin positions are unique within the |
| 59 | + * same action. Duplicate product_ids are not permitted within a single pin map. The max size of |
| 60 | + * this map is 120, equivalent to the max [request page size](https://cloud.google.com/retail/docs |
| 61 | + * /reference/rest/v2/projects.locations.catalogs.placements/search#request-body). |
| 62 | + * @return value or {@code null} for none |
| 63 | + */ |
| 64 | + public java.util.Map<String, java.lang.String> getPinMap() { |
| 65 | + return pinMap; |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Required. A map of positions to product_ids. Partial matches per action are allowed, if a |
| 70 | + * certain position in the map is already filled that `[position, product_id]` pair will be |
| 71 | + * ignored but the rest may still be applied. This case will only occur if multiple pin actions |
| 72 | + * are matched to a single request, as the map guarantees that pin positions are unique within the |
| 73 | + * same action. Duplicate product_ids are not permitted within a single pin map. The max size of |
| 74 | + * this map is 120, equivalent to the max [request page size](https://cloud.google.com/retail/docs |
| 75 | + * /reference/rest/v2/projects.locations.catalogs.placements/search#request-body). |
| 76 | + * @param pinMap pinMap or {@code null} for none |
| 77 | + */ |
| 78 | + public GoogleCloudRetailV2alphaRulePinAction setPinMap(java.util.Map<String, java.lang.String> pinMap) { |
| 79 | + this.pinMap = pinMap; |
| 80 | + return this; |
| 81 | + } |
| 82 | + |
| 83 | + @Override |
| 84 | + public GoogleCloudRetailV2alphaRulePinAction set(String fieldName, Object value) { |
| 85 | + return (GoogleCloudRetailV2alphaRulePinAction) super.set(fieldName, value); |
| 86 | + } |
| 87 | + |
| 88 | + @Override |
| 89 | + public GoogleCloudRetailV2alphaRulePinAction clone() { |
| 90 | + return (GoogleCloudRetailV2alphaRulePinAction) super.clone(); |
| 91 | + } |
| 92 | + |
| 93 | +} |
0 commit comments