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

com.google.api.services.retail.v2.CloudRetail Maven / Gradle / Ivy

/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.retail.v2;

/**
 * Service definition for CloudRetail (v2).
 *
 * 

* Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud. *

* *

* For more information about this service, see the * API Documentation *

* *

* This service uses {@link CloudRetailRequestInitializer} to initialize global parameters via its * {@link Builder}. *

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class CloudRetail extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { // Note: Leave this static initializer at the top of the file. static { com.google.api.client.util.Preconditions.checkState( com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 || (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 && com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)), "You are currently running with version %s of google-api-client. " + "You need at least version 1.31.1 of google-api-client to run version " + "1.32.1 of the Retail API library.", com.google.api.client.googleapis.GoogleUtils.VERSION); } /** * The default encoded root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_ROOT_URL = "https://retail.googleapis.com/"; /** * The default encoded mTLS root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.31 */ public static final String DEFAULT_MTLS_ROOT_URL = "https://retail.mtls.googleapis.com/"; /** * The default encoded service path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_SERVICE_PATH = ""; /** * The default encoded batch path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.23 */ public static final String DEFAULT_BATCH_PATH = "batch"; /** * The default encoded base URL of the service. This is determined when the library is generated * and normally should not be changed. */ public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; /** * Constructor. * *

* Use {@link Builder} if you need to specify any of the optional parameters. *

* * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public CloudRetail(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { this(new Builder(transport, jsonFactory, httpRequestInitializer)); } /** * @param builder builder */ CloudRetail(Builder builder) { super(builder); } @Override protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { super.initialize(httpClientRequest); } /** * An accessor for creating requests from the Projects collection. * *

The typical use is:

*
   *   {@code CloudRetail retail = new CloudRetail(...);}
   *   {@code CloudRetail.Projects.List request = retail.projects().list(parameters ...)}
   * 
* * @return the resource collection */ public Projects projects() { return new Projects(); } /** * The "projects" collection of methods. */ public class Projects { /** * An accessor for creating requests from the Locations collection. * *

The typical use is:

*
     *   {@code CloudRetail retail = new CloudRetail(...);}
     *   {@code CloudRetail.Locations.List request = retail.locations().list(parameters ...)}
     * 
* * @return the resource collection */ public Locations locations() { return new Locations(); } /** * The "locations" collection of methods. */ public class Locations { /** * An accessor for creating requests from the Catalogs collection. * *

The typical use is:

*
       *   {@code CloudRetail retail = new CloudRetail(...);}
       *   {@code CloudRetail.Catalogs.List request = retail.catalogs().list(parameters ...)}
       * 
* * @return the resource collection */ public Catalogs catalogs() { return new Catalogs(); } /** * The "catalogs" collection of methods. */ public class Catalogs { /** * Completes the specified prefix with keyword suggestions. This feature is only available for users * who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this * feature. * * Create a request for the method "catalogs.completeQuery". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link CompleteQuery#execute()} method to invoke the remote operation. * * @param catalog Required. Catalog for which the completion is performed. Full resource name of catalog, such as * `projects/locations/global/catalogs/default_catalog`. * @return the request */ public CompleteQuery completeQuery(java.lang.String catalog) throws java.io.IOException { CompleteQuery result = new CompleteQuery(catalog); initialize(result); return result; } public class CompleteQuery extends CloudRetailRequest { private static final String REST_PATH = "v2/{+catalog}:completeQuery"; private final java.util.regex.Pattern CATALOG_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Completes the specified prefix with keyword suggestions. This feature is only available for * users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using * this feature. * * Create a request for the method "catalogs.completeQuery". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link CompleteQuery#execute()} method to invoke the remote operation.

* {@link CompleteQuery#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientR * equest)} must be called to initialize this instance immediately after invoking the constructor. *

* * @param catalog Required. Catalog for which the completion is performed. Full resource name of catalog, such as * `projects/locations/global/catalogs/default_catalog`. * @since 1.13 */ protected CompleteQuery(java.lang.String catalog) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleCloudRetailV2CompleteQueryResponse.class); this.catalog = com.google.api.client.util.Preconditions.checkNotNull(catalog, "Required parameter catalog must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public CompleteQuery set$Xgafv(java.lang.String $Xgafv) { return (CompleteQuery) super.set$Xgafv($Xgafv); } @Override public CompleteQuery setAccessToken(java.lang.String accessToken) { return (CompleteQuery) super.setAccessToken(accessToken); } @Override public CompleteQuery setAlt(java.lang.String alt) { return (CompleteQuery) super.setAlt(alt); } @Override public CompleteQuery setCallback(java.lang.String callback) { return (CompleteQuery) super.setCallback(callback); } @Override public CompleteQuery setFields(java.lang.String fields) { return (CompleteQuery) super.setFields(fields); } @Override public CompleteQuery setKey(java.lang.String key) { return (CompleteQuery) super.setKey(key); } @Override public CompleteQuery setOauthToken(java.lang.String oauthToken) { return (CompleteQuery) super.setOauthToken(oauthToken); } @Override public CompleteQuery setPrettyPrint(java.lang.Boolean prettyPrint) { return (CompleteQuery) super.setPrettyPrint(prettyPrint); } @Override public CompleteQuery setQuotaUser(java.lang.String quotaUser) { return (CompleteQuery) super.setQuotaUser(quotaUser); } @Override public CompleteQuery setUploadType(java.lang.String uploadType) { return (CompleteQuery) super.setUploadType(uploadType); } @Override public CompleteQuery setUploadProtocol(java.lang.String uploadProtocol) { return (CompleteQuery) super.setUploadProtocol(uploadProtocol); } /** * Required. Catalog for which the completion is performed. Full resource name of catalog, * such as `projects/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String catalog; /** Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/locations/global/catalogs/default_catalog`. */ public java.lang.String getCatalog() { return catalog; } /** * Required. Catalog for which the completion is performed. Full resource name of catalog, * such as `projects/locations/global/catalogs/default_catalog`. */ public CompleteQuery setCatalog(java.lang.String catalog) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.catalog = catalog; return this; } /** * Determines which dataset to use for fetching completion. "user-data" will use the * imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will * use the dataset generated by cloud retail based on user events. If leave empty, it will * use the "user-data". Current supported values: * user-data * cloud-retail: This option * requires enabling auto-learning function first. See * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated- * completion-dataset). */ @com.google.api.client.util.Key private java.lang.String dataset; /** Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values: * user-data * cloud-retail: This option requires enabling auto-learning function first. See [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion- dataset). */ public java.lang.String getDataset() { return dataset; } /** * Determines which dataset to use for fetching completion. "user-data" will use the * imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will * use the dataset generated by cloud retail based on user events. If leave empty, it will * use the "user-data". Current supported values: * user-data * cloud-retail: This option * requires enabling auto-learning function first. See * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated- * completion-dataset). */ public CompleteQuery setDataset(java.lang.String dataset) { this.dataset = dataset; return this; } /** * The device type context for completion suggestions. It is useful to apply different * suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the * suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`. */ @com.google.api.client.util.Key private java.lang.String deviceType; /** The device type context for completion suggestions. It is useful to apply different suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`. */ public java.lang.String getDeviceType() { return deviceType; } /** * The device type context for completion suggestions. It is useful to apply different * suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the * suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`. */ public CompleteQuery setDeviceType(java.lang.String deviceType) { this.deviceType = deviceType; return this; } /** * The language filters applied to the output suggestions. If set, it should contain the * language of the query. If not set, suggestions are returned without considering * language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". * For more information, see [Tags for Identifying * Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is * 3. */ @com.google.api.client.util.Key private java.util.List languageCodes; /** The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3. */ public java.util.List getLanguageCodes() { return languageCodes; } /** * The language filters applied to the output suggestions. If set, it should contain the * language of the query. If not set, suggestions are returned without considering * language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". * For more information, see [Tags for Identifying * Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is * 3. */ public CompleteQuery setLanguageCodes(java.util.List languageCodes) { this.languageCodes = languageCodes; return this; } /** * Completion max suggestions. If left unset or set to 0, then will fallback to the * configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions * is 20. If it is set higher, it will be capped by 20. */ @com.google.api.client.util.Key private java.lang.Integer maxSuggestions; /** Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20. */ public java.lang.Integer getMaxSuggestions() { return maxSuggestions; } /** * Completion max suggestions. If left unset or set to 0, then will fallback to the * configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions * is 20. If it is set higher, it will be capped by 20. */ public CompleteQuery setMaxSuggestions(java.lang.Integer maxSuggestions) { this.maxSuggestions = maxSuggestions; return this; } /** * Required. The query used to generate suggestions. The maximum number of allowed * characters is 255. */ @com.google.api.client.util.Key private java.lang.String query; /** Required. The query used to generate suggestions. The maximum number of allowed characters is 255. */ public java.lang.String getQuery() { return query; } /** * Required. The query used to generate suggestions. The maximum number of allowed * characters is 255. */ public CompleteQuery setQuery(java.lang.String query) { this.query = query; return this; } /** * Required field. A unique identifier for tracking visitors. For example, this could be * implemented with an HTTP cookie, which should be able to uniquely identify a visitor on * a single device. This unique identifier should not change if the visitor logs in or out * of the website. The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. */ @com.google.api.client.util.Key private java.lang.String visitorId; /** Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ public java.lang.String getVisitorId() { return visitorId; } /** * Required field. A unique identifier for tracking visitors. For example, this could be * implemented with an HTTP cookie, which should be able to uniquely identify a visitor on * a single device. This unique identifier should not change if the visitor logs in or out * of the website. The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. */ public CompleteQuery setVisitorId(java.lang.String visitorId) { this.visitorId = visitorId; return this; } @Override public CompleteQuery set(String parameterName, Object value) { return (CompleteQuery) super.set(parameterName, value); } } /** * Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under * a specified parent catalog. * * Create a request for the method "catalogs.getDefaultBranch". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link GetDefaultBranch#execute()} method to invoke the remote operation. * * @param catalog The parent catalog resource name, such as `projects/locations/global/catalogs/default_catalog`. * @return the request */ public GetDefaultBranch getDefaultBranch(java.lang.String catalog) throws java.io.IOException { GetDefaultBranch result = new GetDefaultBranch(catalog); initialize(result); return result; } public class GetDefaultBranch extends CloudRetailRequest { private static final String REST_PATH = "v2/{+catalog}:getDefaultBranch"; private final java.util.regex.Pattern CATALOG_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Get which branch is currently default branch set by CatalogService.SetDefaultBranch method * under a specified parent catalog. * * Create a request for the method "catalogs.getDefaultBranch". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link GetDefaultBranch#execute()} method to invoke the remote operation. *

{@link GetDefaultBranch#initialize(com.google.api.client.googleapis.services.AbstractGoogle * ClientRequest)} must be called to initialize this instance immediately after invoking the * constructor.

* * @param catalog The parent catalog resource name, such as `projects/locations/global/catalogs/default_catalog`. * @since 1.13 */ protected GetDefaultBranch(java.lang.String catalog) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleCloudRetailV2GetDefaultBranchResponse.class); this.catalog = com.google.api.client.util.Preconditions.checkNotNull(catalog, "Required parameter catalog must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetDefaultBranch set$Xgafv(java.lang.String $Xgafv) { return (GetDefaultBranch) super.set$Xgafv($Xgafv); } @Override public GetDefaultBranch setAccessToken(java.lang.String accessToken) { return (GetDefaultBranch) super.setAccessToken(accessToken); } @Override public GetDefaultBranch setAlt(java.lang.String alt) { return (GetDefaultBranch) super.setAlt(alt); } @Override public GetDefaultBranch setCallback(java.lang.String callback) { return (GetDefaultBranch) super.setCallback(callback); } @Override public GetDefaultBranch setFields(java.lang.String fields) { return (GetDefaultBranch) super.setFields(fields); } @Override public GetDefaultBranch setKey(java.lang.String key) { return (GetDefaultBranch) super.setKey(key); } @Override public GetDefaultBranch setOauthToken(java.lang.String oauthToken) { return (GetDefaultBranch) super.setOauthToken(oauthToken); } @Override public GetDefaultBranch setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetDefaultBranch) super.setPrettyPrint(prettyPrint); } @Override public GetDefaultBranch setQuotaUser(java.lang.String quotaUser) { return (GetDefaultBranch) super.setQuotaUser(quotaUser); } @Override public GetDefaultBranch setUploadType(java.lang.String uploadType) { return (GetDefaultBranch) super.setUploadType(uploadType); } @Override public GetDefaultBranch setUploadProtocol(java.lang.String uploadProtocol) { return (GetDefaultBranch) super.setUploadProtocol(uploadProtocol); } /** * The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String catalog; /** The parent catalog resource name, such as `projects/locations/global/catalogs/default_catalog`. */ public java.lang.String getCatalog() { return catalog; } /** * The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog`. */ public GetDefaultBranch setCatalog(java.lang.String catalog) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.catalog = catalog; return this; } @Override public GetDefaultBranch set(String parameterName, Object value) { return (GetDefaultBranch) super.set(parameterName, value); } } /** * Lists all the Catalogs associated with the project. * * Create a request for the method "catalogs.list". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The account resource name with an associated location. If the caller does not have * permission to list Catalogs under this location, regardless of whether or not this * location exists, a PERMISSION_DENIED error is returned. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/catalogs"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists all the Catalogs associated with the project. * * Create a request for the method "catalogs.list". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The account resource name with an associated location. If the caller does not have * permission to list Catalogs under this location, regardless of whether or not this * location exists, a PERMISSION_DENIED error is returned. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ListCatalogsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The account resource name with an associated location. If the caller does not * have permission to list Catalogs under this location, regardless of whether or not this * location exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getParent() { return parent; } /** * Required. The account resource name with an associated location. If the caller does not * have permission to list Catalogs under this location, regardless of whether or not this * location exists, a PERMISSION_DENIED error is returned. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum * allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is * negative, an INVALID_ARGUMENT is returned. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned. */ public java.lang.Integer getPageSize() { return pageSize; } /** * Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum * allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is * negative, an INVALID_ARGUMENT is returned. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A page token ListCatalogsResponse.next_page_token, received from a previous * CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When * paginating, all other parameters provided to CatalogService.ListCatalogs must match the * call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. */ public java.lang.String getPageToken() { return pageToken; } /** * A page token ListCatalogsResponse.next_page_token, received from a previous * CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When * paginating, all other parameters provided to CatalogService.ListCatalogs must match the * call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the Catalogs. * * Create a request for the method "catalogs.patch". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Required. Immutable. The fully qualified resource name of the catalog. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Catalog} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Catalog content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Updates the Catalogs. * * Create a request for the method "catalogs.patch". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. Immutable. The fully qualified resource name of the catalog. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Catalog} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Catalog content) { super(CloudRetail.this, "PATCH", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Catalog.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** Required. Immutable. The fully qualified resource name of the catalog. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Immutable. The fully qualified resource name of the catalog. */ public java.lang.String getName() { return name; } /** Required. Immutable. The fully qualified resource name of the catalog. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.name = name; return this; } /** * Indicates which fields in the provided Catalog to update. If an unsupported or unknown * field is provided, an INVALID_ARGUMENT error is returned. */ @com.google.api.client.util.Key private String updateMask; /** Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. */ public String getUpdateMask() { return updateMask; } /** * Indicates which fields in the provided Catalog to update. If an unsupported or unknown * field is provided, an INVALID_ARGUMENT error is returned. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Set a specified branch id as default branch. API methods such as SearchService.Search, * ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch" * to the actual branch id set as default. For example, if `projects/locations/catalogs/branches/1` * is set as default, setting SearchRequest.branch to * `projects/locations/catalogs/branches/default_branch` is equivalent to setting * SearchRequest.branch to `projects/locations/catalogs/branches/1`. Using multiple branches can be * useful when developers would like to have a staging branch to test and verify for future usage. * When it becomes ready, developers switch on the staging branch using this API while keeping using * `projects/locations/catalogs/branches/default_branch` as SearchRequest.branch to route the * traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the * default branch could potentially cause outages if the ID space of the new branch is very * different from the old one. More specifically: * PredictionService will only return product IDs * from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if * branch is not explicitly set). * UserEventService will only join events with products from branch * {newBranch}. * * Create a request for the method "catalogs.setDefaultBranch". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link SetDefaultBranch#execute()} method to invoke the remote operation. * * @param catalog Full resource name of the catalog, such as `projects/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetDefaultBranchRequest} * @return the request */ public SetDefaultBranch setDefaultBranch(java.lang.String catalog, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetDefaultBranchRequest content) throws java.io.IOException { SetDefaultBranch result = new SetDefaultBranch(catalog, content); initialize(result); return result; } public class SetDefaultBranch extends CloudRetailRequest { private static final String REST_PATH = "v2/{+catalog}:setDefaultBranch"; private final java.util.regex.Pattern CATALOG_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Set a specified branch id as default branch. API methods such as SearchService.Search, * ProductService.GetProduct, ProductService.ListProducts will treat requests using * "default_branch" to the actual branch id set as default. For example, if * `projects/locations/catalogs/branches/1` is set as default, setting SearchRequest.branch to * `projects/locations/catalogs/branches/default_branch` is equivalent to setting * SearchRequest.branch to `projects/locations/catalogs/branches/1`. Using multiple branches can * be useful when developers would like to have a staging branch to test and verify for future * usage. When it becomes ready, developers switch on the staging branch using this API while * keeping using `projects/locations/catalogs/branches/default_branch` as SearchRequest.branch to * route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, * switching the default branch could potentially cause outages if the ID space of the new branch * is very different from the old one. More specifically: * PredictionService will only return * product IDs from branch {newBranch}. * SearchService will only return product IDs from branch * {newBranch} (if branch is not explicitly set). * UserEventService will only join events with * products from branch {newBranch}. * * Create a request for the method "catalogs.setDefaultBranch". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link SetDefaultBranch#execute()} method to invoke the remote operation. *

{@link SetDefaultBranch#initialize(com.google.api.client.googleapis.services.AbstractGoogle * ClientRequest)} must be called to initialize this instance immediately after invoking the * constructor.

* * @param catalog Full resource name of the catalog, such as `projects/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetDefaultBranchRequest} * @since 1.13 */ protected SetDefaultBranch(java.lang.String catalog, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetDefaultBranchRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleProtobufEmpty.class); this.catalog = com.google.api.client.util.Preconditions.checkNotNull(catalog, "Required parameter catalog must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public SetDefaultBranch set$Xgafv(java.lang.String $Xgafv) { return (SetDefaultBranch) super.set$Xgafv($Xgafv); } @Override public SetDefaultBranch setAccessToken(java.lang.String accessToken) { return (SetDefaultBranch) super.setAccessToken(accessToken); } @Override public SetDefaultBranch setAlt(java.lang.String alt) { return (SetDefaultBranch) super.setAlt(alt); } @Override public SetDefaultBranch setCallback(java.lang.String callback) { return (SetDefaultBranch) super.setCallback(callback); } @Override public SetDefaultBranch setFields(java.lang.String fields) { return (SetDefaultBranch) super.setFields(fields); } @Override public SetDefaultBranch setKey(java.lang.String key) { return (SetDefaultBranch) super.setKey(key); } @Override public SetDefaultBranch setOauthToken(java.lang.String oauthToken) { return (SetDefaultBranch) super.setOauthToken(oauthToken); } @Override public SetDefaultBranch setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetDefaultBranch) super.setPrettyPrint(prettyPrint); } @Override public SetDefaultBranch setQuotaUser(java.lang.String quotaUser) { return (SetDefaultBranch) super.setQuotaUser(quotaUser); } @Override public SetDefaultBranch setUploadType(java.lang.String uploadType) { return (SetDefaultBranch) super.setUploadType(uploadType); } @Override public SetDefaultBranch setUploadProtocol(java.lang.String uploadProtocol) { return (SetDefaultBranch) super.setUploadProtocol(uploadProtocol); } /** * Full resource name of the catalog, such as * `projects/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String catalog; /** Full resource name of the catalog, such as `projects/locations/global/catalogs/default_catalog`. */ public java.lang.String getCatalog() { return catalog; } /** * Full resource name of the catalog, such as * `projects/locations/global/catalogs/default_catalog`. */ public SetDefaultBranch setCatalog(java.lang.String catalog) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CATALOG_PATTERN.matcher(catalog).matches(), "Parameter catalog must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.catalog = catalog; return this; } @Override public SetDefaultBranch set(String parameterName, Object value) { return (SetDefaultBranch) super.set(parameterName, value); } } /** * An accessor for creating requests from the Branches collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.Branches.List request = retail.branches().list(parameters ...)}
         * 
* * @return the resource collection */ public Branches branches() { return new Branches(); } /** * The "branches" collection of methods. */ public class Branches { /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
           *   {@code CloudRetail retail = new CloudRetail(...);}
           *   {@code CloudRetail.Operations.List request = retail.operations().list(parameters ...)}
           * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name The name of the operation resource. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$"); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Products collection. * *

The typical use is:

*
           *   {@code CloudRetail retail = new CloudRetail(...);}
           *   {@code CloudRetail.Products.List request = retail.products().list(parameters ...)}
           * 
* * @return the resource collection */ public Products products() { return new Products(); } /** * The "products" collection of methods. */ public class Products { /** * Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous * and does not require the Product to exist before updating fulfillment information. If the request * is valid, the update will be enqueued and processed downstream. As a consequence, when a response * is returned, the added place IDs are not immediately manifested in the Product queried by * GetProduct or ListProducts. This feature is only available for users who have Retail Search * enabled. Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "products.addFulfillmentPlaces". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link AddFulfillmentPlaces#execute()} method to invoke the remote * operation. * * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddFulfillmentPlacesRequest} * @return the request */ public AddFulfillmentPlaces addFulfillmentPlaces(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddFulfillmentPlacesRequest content) throws java.io.IOException { AddFulfillmentPlaces result = new AddFulfillmentPlaces(product, content); initialize(result); return result; } public class AddFulfillmentPlaces extends CloudRetailRequest { private static final String REST_PATH = "v2/{+product}:addFulfillmentPlaces"; private final java.util.regex.Pattern PRODUCT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is * asynchronous and does not require the Product to exist before updating fulfillment information. * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the Product queried by GetProduct or ListProducts. This feature is only available for users who * have Retail Search enabled. Please enable Retail Search on Cloud Console before using this * feature. * * Create a request for the method "products.addFulfillmentPlaces". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link AddFulfillmentPlaces#execute()} method to invoke the remote * operation.

{@link AddFulfillmentPlaces#initialize(com.google.api.client.googleapis.services * .AbstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddFulfillmentPlacesRequest} * @since 1.13 */ protected AddFulfillmentPlaces(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddFulfillmentPlacesRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.product = com.google.api.client.util.Preconditions.checkNotNull(product, "Required parameter product must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public AddFulfillmentPlaces set$Xgafv(java.lang.String $Xgafv) { return (AddFulfillmentPlaces) super.set$Xgafv($Xgafv); } @Override public AddFulfillmentPlaces setAccessToken(java.lang.String accessToken) { return (AddFulfillmentPlaces) super.setAccessToken(accessToken); } @Override public AddFulfillmentPlaces setAlt(java.lang.String alt) { return (AddFulfillmentPlaces) super.setAlt(alt); } @Override public AddFulfillmentPlaces setCallback(java.lang.String callback) { return (AddFulfillmentPlaces) super.setCallback(callback); } @Override public AddFulfillmentPlaces setFields(java.lang.String fields) { return (AddFulfillmentPlaces) super.setFields(fields); } @Override public AddFulfillmentPlaces setKey(java.lang.String key) { return (AddFulfillmentPlaces) super.setKey(key); } @Override public AddFulfillmentPlaces setOauthToken(java.lang.String oauthToken) { return (AddFulfillmentPlaces) super.setOauthToken(oauthToken); } @Override public AddFulfillmentPlaces setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddFulfillmentPlaces) super.setPrettyPrint(prettyPrint); } @Override public AddFulfillmentPlaces setQuotaUser(java.lang.String quotaUser) { return (AddFulfillmentPlaces) super.setQuotaUser(quotaUser); } @Override public AddFulfillmentPlaces setUploadType(java.lang.String uploadType) { return (AddFulfillmentPlaces) super.setUploadType(uploadType); } @Override public AddFulfillmentPlaces setUploadProtocol(java.lang.String uploadProtocol) { return (AddFulfillmentPlaces) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String product; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getProduct() { return product; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ public AddFulfillmentPlaces setProduct(java.lang.String product) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.product = product; return this; } @Override public AddFulfillmentPlaces set(String parameterName, Object value) { return (AddFulfillmentPlaces) super.set(parameterName, value); } } /** * Updates local inventory information for a Product at a list of places, while respecting the last * update timestamps of each inventory field. This process is asynchronous and does not require the * Product to exist before updating inventory information. If the request is valid, the update will * be enqueued and processed downstream. As a consequence, when a response is returned, updates are * not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory * information can only be modified using this method. CreateProduct and UpdateProduct has no effect * on local inventories. This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "products.addLocalInventories". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link AddLocalInventories#execute()} method to invoke the remote operation. * * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddLocalInventoriesRequest} * @return the request */ public AddLocalInventories addLocalInventories(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddLocalInventoriesRequest content) throws java.io.IOException { AddLocalInventories result = new AddLocalInventories(product, content); initialize(result); return result; } public class AddLocalInventories extends CloudRetailRequest { private static final String REST_PATH = "v2/{+product}:addLocalInventories"; private final java.util.regex.Pattern PRODUCT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Updates local inventory information for a Product at a list of places, while respecting the * last update timestamps of each inventory field. This process is asynchronous and does not * require the Product to exist before updating inventory information. If the request is valid, * the update will be enqueued and processed downstream. As a consequence, when a response is * returned, updates are not immediately manifested in the Product queried by GetProduct or * ListProducts. Local inventory information can only be modified using this method. CreateProduct * and UpdateProduct has no effect on local inventories. This feature is only available for users * who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this * feature. * * Create a request for the method "products.addLocalInventories". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link AddLocalInventories#execute()} method to invoke the remote * operation.

{@link AddLocalInventories#initialize(com.google.api.client.googleapis.services. * AbstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddLocalInventoriesRequest} * @since 1.13 */ protected AddLocalInventories(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2AddLocalInventoriesRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.product = com.google.api.client.util.Preconditions.checkNotNull(product, "Required parameter product must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public AddLocalInventories set$Xgafv(java.lang.String $Xgafv) { return (AddLocalInventories) super.set$Xgafv($Xgafv); } @Override public AddLocalInventories setAccessToken(java.lang.String accessToken) { return (AddLocalInventories) super.setAccessToken(accessToken); } @Override public AddLocalInventories setAlt(java.lang.String alt) { return (AddLocalInventories) super.setAlt(alt); } @Override public AddLocalInventories setCallback(java.lang.String callback) { return (AddLocalInventories) super.setCallback(callback); } @Override public AddLocalInventories setFields(java.lang.String fields) { return (AddLocalInventories) super.setFields(fields); } @Override public AddLocalInventories setKey(java.lang.String key) { return (AddLocalInventories) super.setKey(key); } @Override public AddLocalInventories setOauthToken(java.lang.String oauthToken) { return (AddLocalInventories) super.setOauthToken(oauthToken); } @Override public AddLocalInventories setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddLocalInventories) super.setPrettyPrint(prettyPrint); } @Override public AddLocalInventories setQuotaUser(java.lang.String quotaUser) { return (AddLocalInventories) super.setQuotaUser(quotaUser); } @Override public AddLocalInventories setUploadType(java.lang.String uploadType) { return (AddLocalInventories) super.setUploadType(uploadType); } @Override public AddLocalInventories setUploadProtocol(java.lang.String uploadProtocol) { return (AddLocalInventories) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String product; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getProduct() { return product; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ public AddLocalInventories setProduct(java.lang.String product) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.product = product; return this; } @Override public AddLocalInventories set(String parameterName, Object value) { return (AddLocalInventories) super.set(parameterName, value); } } /** * Creates a Product. * * Create a request for the method "products.create". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/products"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); /** * Creates a Product. * * Create a request for the method "products.create". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent catalog resource name, such as `projects/locations/global/catalogs/default_catalog/branches/default_branch`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch`. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } this.parent = parent; return this; } /** * Required. The ID to use for the Product, which will become the final component of * the Product.name. If the caller does not have permission to create the Product, * regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This * field must be unique among all Products with the same parent. Otherwise, an * ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a * length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ @com.google.api.client.util.Key private java.lang.String productId; /** Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ public java.lang.String getProductId() { return productId; } /** * Required. The ID to use for the Product, which will become the final component of * the Product.name. If the caller does not have permission to create the Product, * regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This * field must be unique among all Products with the same parent. Otherwise, an * ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a * length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ public Create setProductId(java.lang.String productId) { this.productId = productId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a Product. * * Create a request for the method "products.delete". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The * Product to delete can neither be a Product.Type.COLLECTION Product member nor a * Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT * error is returned. All inventory information for the named Product will be deleted. * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Deletes a Product. * * Create a request for the method "products.delete". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The * Product to delete can neither be a Product.Type.COLLECTION Product member nor a * Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT * error is returned. All inventory information for the named Product will be deleted. * @since 1.13 */ protected Delete(java.lang.String name) { super(CloudRetail.this, "DELETE", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleProtobufEmpty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to delete the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. If the Product to delete does not * exist, a NOT_FOUND error is returned. The Product to delete can neither be a * Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more * than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory * information for the named Product will be deleted. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted. */ public java.lang.String getName() { return name; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to delete the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. If the Product to delete does not * exist, a NOT_FOUND error is returned. The Product to delete can neither be a * Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more * than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory * information for the named Product will be deleted. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.name = name; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a Product. * * Create a request for the method "products.get". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. If the requested Product does not exist, a NOT_FOUND error is returned. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Gets a Product. * * Create a request for the method "products.get". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. If the requested Product does not exist, a NOT_FOUND error is returned. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. If the requested Product does not * exist, a NOT_FOUND error is returned. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned. */ public java.lang.String getName() { return name; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. If the requested Product does not * exist, a NOT_FOUND error is returned. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are * created. Note that it is possible for a subset of the Products to be successfully updated. * * Create a request for the method "products.import". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. * * @param parent Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no * updateMask is specified, requires products.create permission. If updateMask is specified, * requires products.update permission. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportProductsRequest} * @return the request */ public CloudRetailImport retailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportProductsRequest content) throws java.io.IOException { CloudRetailImport result = new CloudRetailImport(parent, content); initialize(result); return result; } public class CloudRetailImport extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/products:import"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); /** * Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are * created. Note that it is possible for a subset of the Products to be successfully updated. * * Create a request for the method "products.import". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. *

{@link CloudRetailImport#initialize(com.google.api.client.googleapis.services.AbstractGoogl * eClientRequest)} must be called to initialize this instance immediately after invoking the * constructor.

* * @param parent Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no * updateMask is specified, requires products.create permission. If updateMask is specified, * requires products.update permission. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportProductsRequest} * @since 1.13 */ protected CloudRetailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportProductsRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } } @Override public CloudRetailImport set$Xgafv(java.lang.String $Xgafv) { return (CloudRetailImport) super.set$Xgafv($Xgafv); } @Override public CloudRetailImport setAccessToken(java.lang.String accessToken) { return (CloudRetailImport) super.setAccessToken(accessToken); } @Override public CloudRetailImport setAlt(java.lang.String alt) { return (CloudRetailImport) super.setAlt(alt); } @Override public CloudRetailImport setCallback(java.lang.String callback) { return (CloudRetailImport) super.setCallback(callback); } @Override public CloudRetailImport setFields(java.lang.String fields) { return (CloudRetailImport) super.setFields(fields); } @Override public CloudRetailImport setKey(java.lang.String key) { return (CloudRetailImport) super.setKey(key); } @Override public CloudRetailImport setOauthToken(java.lang.String oauthToken) { return (CloudRetailImport) super.setOauthToken(oauthToken); } @Override public CloudRetailImport setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloudRetailImport) super.setPrettyPrint(prettyPrint); } @Override public CloudRetailImport setQuotaUser(java.lang.String quotaUser) { return (CloudRetailImport) super.setQuotaUser(quotaUser); } @Override public CloudRetailImport setUploadType(java.lang.String uploadType) { return (CloudRetailImport) super.setUploadType(uploadType); } @Override public CloudRetailImport setUploadProtocol(java.lang.String uploadProtocol) { return (CloudRetailImport) super.setUploadProtocol(uploadProtocol); } /** * Required. * `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` * If no updateMask is specified, requires products.create permission. If updateMask * is specified, requires products.update permission. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission. */ public java.lang.String getParent() { return parent; } /** * Required. * `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` * If no updateMask is specified, requires products.create permission. If updateMask * is specified, requires products.update permission. */ public CloudRetailImport setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } this.parent = parent; return this; } @Override public CloudRetailImport set(String parameterName, Object value) { return (CloudRetailImport) super.set(parameterName, value); } } /** * Gets a list of Products. * * Create a request for the method "products.list". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent branch resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as * the branch ID, to list products under the default branch. If the caller does not have * permission to list Products under this branch, regardless of whether or not this branch * exists, a PERMISSION_DENIED error is returned. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/products"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); /** * Gets a list of Products. * * Create a request for the method "products.list". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent branch resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as * the branch ID, to list products under the default branch. If the caller does not have * permission to list Products under this branch, regardless of whether or not this branch * exists, a PERMISSION_DENIED error is returned. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ListProductsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent branch resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/0`. Use * `default_branch` as the branch ID, to list products under the default branch. If * the caller does not have permission to list Products under this branch, regardless * of whether or not this branch exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent branch resource name, such as `projects/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getParent() { return parent; } /** * Required. The parent branch resource name, such as * `projects/locations/global/catalogs/default_catalog/branches/0`. Use * `default_branch` as the branch ID, to list products under the default branch. If * the caller does not have permission to list Products under this branch, regardless * of whether or not this branch exists, a PERMISSION_DENIED error is returned. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$"); } this.parent = parent; return this; } /** * A filter to apply on the list results. Supported features: * List all the products * under the parent branch if filter is unset. * List Product.Type.VARIANT Products * sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = * "some_product_id"` * List Products bundled in a Product.Type.COLLECTION Product. * For example: `collection_product_id = "some_product_id"` * List Products with a * partibular type. For example: `type = "PRIMARY"` `type = "VARIANT"` `type = * "COLLECTION"` If the field is unrecognizable, an INVALID_ARGUMENT error is * returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION * Product does not exist, a NOT_FOUND error is returned. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = "some_product_id"` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = "some_product_id"` * List Products with a partibular type. For example: `type = "PRIMARY"` `type = "VARIANT"` `type = "COLLECTION"` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned. */ public java.lang.String getFilter() { return filter; } /** * A filter to apply on the list results. Supported features: * List all the products * under the parent branch if filter is unset. * List Product.Type.VARIANT Products * sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = * "some_product_id"` * List Products bundled in a Product.Type.COLLECTION Product. * For example: `collection_product_id = "some_product_id"` * List Products with a * partibular type. For example: `type = "PRIMARY"` `type = "VARIANT"` `type = * "COLLECTION"` If the field is unrecognizable, an INVALID_ARGUMENT error is * returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION * Product does not exist, a NOT_FOUND error is returned. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Maximum number of Products to return. If unspecified, defaults to 100. The maximum * allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is * negative, an INVALID_ARGUMENT error is returned. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. */ public java.lang.Integer getPageSize() { return pageSize; } /** * Maximum number of Products to return. If unspecified, defaults to 100. The maximum * allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is * negative, an INVALID_ARGUMENT error is returned. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A page token ListProductsResponse.next_page_token, received from a previous * ProductService.ListProducts call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to ProductService.ListProducts must * match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error * is returned. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. */ public java.lang.String getPageToken() { return pageToken; } /** * A page token ListProductsResponse.next_page_token, received from a previous * ProductService.ListProducts call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to ProductService.ListProducts must * match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error * is returned. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * The fields of Product to return in the responses. If not set or empty, the * following fields are returned: * Product.name * Product.id * Product.title * * Product.uri * Product.images * Product.price_info * Product.brands If "*" is * provided, all fields are returned. Product.name is always returned no matter what * mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT * error is returned. */ @com.google.api.client.util.Key private String readMask; /** The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If "*" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. */ public String getReadMask() { return readMask; } /** * The fields of Product to return in the responses. If not set or empty, the * following fields are returned: * Product.name * Product.id * Product.title * * Product.uri * Product.images * Product.price_info * Product.brands If "*" is * provided, all fields are returned. Product.name is always returned no matter what * mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT * error is returned. */ public List setReadMask(String readMask) { this.readMask = readMask; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a Product. * * Create a request for the method "products.patch". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Immutable. Full resource name of the product, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/produ * ct_id`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Updates a Product. * * Create a request for the method "products.patch". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param name Immutable. Full resource name of the product, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/produ * ct_id`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product content) { super(CloudRetail.this, "PATCH", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2Product.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Immutable. Full resource name of the product, such as `projects/locations/global/ca * talogs/default_catalog/branches/default_branch/products/product_id`. */ @com.google.api.client.util.Key private java.lang.String name; /** Immutable. Full resource name of the product, such as `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. */ public java.lang.String getName() { return name; } /** * Immutable. Full resource name of the product, such as `projects/locations/global/ca * talogs/default_catalog/branches/default_branch/products/product_id`. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.name = name; return this; } /** * If set to true, and the Product is not found, a new Product will be created. In * this situation, `update_mask` is ignored. */ @com.google.api.client.util.Key private java.lang.Boolean allowMissing; /** If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored. */ public java.lang.Boolean getAllowMissing() { return allowMissing; } /** * If set to true, and the Product is not found, a new Product will be created. In * this situation, `update_mask` is ignored. */ public Patch setAllowMissing(java.lang.Boolean allowMissing) { this.allowMissing = allowMissing; return this; } /** * Indicates which fields in the provided Product to update. The immutable and output * only fields are NOT supported. If not set, all supported fields (the fields that * are neither immutable nor output only) are updated. If an unsupported or unknown * field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be * updated by setting the mask path as "attributes.${key_name}". If a key name is * present in the mask but not in the patching product from the request, this key will * be deleted after the update. */ @com.google.api.client.util.Key private String updateMask; /** Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as "attributes.${key_name}". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update. */ public String getUpdateMask() { return updateMask; } /** * Indicates which fields in the provided Product to update. The immutable and output * only fields are NOT supported. If not set, all supported fields (the fields that * are neither immutable nor output only) are updated. If an unsupported or unknown * field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be * updated by setting the mask path as "attributes.${key_name}". If a key name is * present in the mask but not in the patching product from the request, this key will * be deleted after the update. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is * asynchronous and does not require the Product to exist before updating fulfillment information. * If the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the Product * queried by GetProduct or ListProducts. This feature is only available for users who have Retail * Search enabled. Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "products.removeFulfillmentPlaces". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link RemoveFulfillmentPlaces#execute()} method to invoke the remote * operation. * * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest} * @return the request */ public RemoveFulfillmentPlaces removeFulfillmentPlaces(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest content) throws java.io.IOException { RemoveFulfillmentPlaces result = new RemoveFulfillmentPlaces(product, content); initialize(result); return result; } public class RemoveFulfillmentPlaces extends CloudRetailRequest { private static final String REST_PATH = "v2/{+product}:removeFulfillmentPlaces"; private final java.util.regex.Pattern PRODUCT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is * asynchronous and does not require the Product to exist before updating fulfillment information. * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the Product queried by GetProduct or ListProducts. This feature is only available for users * who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this * feature. * * Create a request for the method "products.removeFulfillmentPlaces". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link RemoveFulfillmentPlaces#execute()} method to invoke the remote * operation.

{@link RemoveFulfillmentPlaces#initialize(com.google.api.client.googleapis.servi * ces.AbstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest} * @since 1.13 */ protected RemoveFulfillmentPlaces(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.product = com.google.api.client.util.Preconditions.checkNotNull(product, "Required parameter product must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public RemoveFulfillmentPlaces set$Xgafv(java.lang.String $Xgafv) { return (RemoveFulfillmentPlaces) super.set$Xgafv($Xgafv); } @Override public RemoveFulfillmentPlaces setAccessToken(java.lang.String accessToken) { return (RemoveFulfillmentPlaces) super.setAccessToken(accessToken); } @Override public RemoveFulfillmentPlaces setAlt(java.lang.String alt) { return (RemoveFulfillmentPlaces) super.setAlt(alt); } @Override public RemoveFulfillmentPlaces setCallback(java.lang.String callback) { return (RemoveFulfillmentPlaces) super.setCallback(callback); } @Override public RemoveFulfillmentPlaces setFields(java.lang.String fields) { return (RemoveFulfillmentPlaces) super.setFields(fields); } @Override public RemoveFulfillmentPlaces setKey(java.lang.String key) { return (RemoveFulfillmentPlaces) super.setKey(key); } @Override public RemoveFulfillmentPlaces setOauthToken(java.lang.String oauthToken) { return (RemoveFulfillmentPlaces) super.setOauthToken(oauthToken); } @Override public RemoveFulfillmentPlaces setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveFulfillmentPlaces) super.setPrettyPrint(prettyPrint); } @Override public RemoveFulfillmentPlaces setQuotaUser(java.lang.String quotaUser) { return (RemoveFulfillmentPlaces) super.setQuotaUser(quotaUser); } @Override public RemoveFulfillmentPlaces setUploadType(java.lang.String uploadType) { return (RemoveFulfillmentPlaces) super.setUploadType(uploadType); } @Override public RemoveFulfillmentPlaces setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveFulfillmentPlaces) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String product; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getProduct() { return product; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ public RemoveFulfillmentPlaces setProduct(java.lang.String product) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.product = product; return this; } @Override public RemoveFulfillmentPlaces set(String parameterName, Object value) { return (RemoveFulfillmentPlaces) super.set(parameterName, value); } } /** * Remove local inventory information for a Product at a list of places at a removal timestamp. This * process is asynchronous. If the request is valid, the removal will be enqueued and processed * downstream. As a consequence, when a response is returned, removals are not immediately * manifested in the Product queried by GetProduct or ListProducts. Local inventory information can * only be removed using this method. CreateProduct and UpdateProduct has no effect on local * inventories. This feature is only available for users who have Retail Search enabled. Please * enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "products.removeLocalInventories". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link RemoveLocalInventories#execute()} method to invoke the remote * operation. * * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveLocalInventoriesRequest} * @return the request */ public RemoveLocalInventories removeLocalInventories(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveLocalInventoriesRequest content) throws java.io.IOException { RemoveLocalInventories result = new RemoveLocalInventories(product, content); initialize(result); return result; } public class RemoveLocalInventories extends CloudRetailRequest { private static final String REST_PATH = "v2/{+product}:removeLocalInventories"; private final java.util.regex.Pattern PRODUCT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Remove local inventory information for a Product at a list of places at a removal timestamp. * This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory * information can only be removed using this method. CreateProduct and UpdateProduct has no * effect on local inventories. This feature is only available for users who have Retail Search * enabled. Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "products.removeLocalInventories". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link RemoveLocalInventories#execute()} method to invoke the remote * operation.

{@link RemoveLocalInventories#initialize(com.google.api.client.googleapis.servic * es.AbstractGoogleClientRequest)} must be called to initialize this instance immediately after * invoking the constructor.

* * @param product Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalog * /branches/default_branch/products/some_product_id`. If the caller does not have permission * to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error * is returned. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveLocalInventoriesRequest} * @since 1.13 */ protected RemoveLocalInventories(java.lang.String product, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RemoveLocalInventoriesRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.product = com.google.api.client.util.Preconditions.checkNotNull(product, "Required parameter product must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public RemoveLocalInventories set$Xgafv(java.lang.String $Xgafv) { return (RemoveLocalInventories) super.set$Xgafv($Xgafv); } @Override public RemoveLocalInventories setAccessToken(java.lang.String accessToken) { return (RemoveLocalInventories) super.setAccessToken(accessToken); } @Override public RemoveLocalInventories setAlt(java.lang.String alt) { return (RemoveLocalInventories) super.setAlt(alt); } @Override public RemoveLocalInventories setCallback(java.lang.String callback) { return (RemoveLocalInventories) super.setCallback(callback); } @Override public RemoveLocalInventories setFields(java.lang.String fields) { return (RemoveLocalInventories) super.setFields(fields); } @Override public RemoveLocalInventories setKey(java.lang.String key) { return (RemoveLocalInventories) super.setKey(key); } @Override public RemoveLocalInventories setOauthToken(java.lang.String oauthToken) { return (RemoveLocalInventories) super.setOauthToken(oauthToken); } @Override public RemoveLocalInventories setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveLocalInventories) super.setPrettyPrint(prettyPrint); } @Override public RemoveLocalInventories setQuotaUser(java.lang.String quotaUser) { return (RemoveLocalInventories) super.setQuotaUser(quotaUser); } @Override public RemoveLocalInventories setUploadType(java.lang.String uploadType) { return (RemoveLocalInventories) super.setUploadType(uploadType); } @Override public RemoveLocalInventories setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveLocalInventories) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ @com.google.api.client.util.Key private java.lang.String product; /** Required. Full resource name of Product, such as `projects/locations/global/catalogs/default_catalo g/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ public java.lang.String getProduct() { return product; } /** * Required. Full resource name of Product, such as `projects/locations/global/catalog * s/default_catalog/branches/default_branch/products/some_product_id`. If the caller * does not have permission to access the Product, regardless of whether or not it * exists, a PERMISSION_DENIED error is returned. */ public RemoveLocalInventories setProduct(java.lang.String product) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PRODUCT_PATTERN.matcher(product).matches(), "Parameter product must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.product = product; return this; } @Override public RemoveLocalInventories set(String parameterName, Object value) { return (RemoveLocalInventories) super.set(parameterName, value); } } /** * Updates inventory information for a Product while respecting the last update timestamps of each * inventory field. This process is asynchronous and does not require the Product to exist before * updating fulfillment information. If the request is valid, the update will be enqueued and * processed downstream. As a consequence, when a response is returned, updates are not immediately * manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with * CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any * existing value(s) while ignoring the last update time for this field. Furthermore, the last * update time for the specified inventory fields will be overwritten to the time of the * CreateProduct or UpdateProduct request. If no inventory fields are set in * CreateProductRequest.product, then any pre-existing inventory information for this product will * be used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing * inventory information will be preserved. Pre-existing inventory information can only be updated * with SetInventory, ProductService.AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature * is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud * Console before using this feature. * * Create a request for the method "products.setInventory". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link SetInventory#execute()} method to invoke the remote operation. * * @param name Immutable. Full resource name of the product, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/produ * ct_id`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetInventoryRequest} * @return the request */ public SetInventory setInventory(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetInventoryRequest content) throws java.io.IOException { SetInventory result = new SetInventory(name, content); initialize(result); return result; } public class SetInventory extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}:setInventory"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); /** * Updates inventory information for a Product while respecting the last update timestamps of each * inventory field. This process is asynchronous and does not require the Product to exist before * updating fulfillment information. If the request is valid, the update will be enqueued and * processed downstream. As a consequence, when a response is returned, updates are not * immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is * updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will * overwrite any existing value(s) while ignoring the last update time for this field. * Furthermore, the last update time for the specified inventory fields will be overwritten to the * time of the CreateProduct or UpdateProduct request. If no inventory fields are set in * CreateProductRequest.product, then any pre-existing inventory information for this product will * be used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing * inventory information will be preserved. Pre-existing inventory information can only be updated * with SetInventory, ProductService.AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This * feature is only available for users who have Retail Search enabled. Please enable Retail Search * on Cloud Console before using this feature. * * Create a request for the method "products.setInventory". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link SetInventory#execute()} method to invoke the remote operation.

* {@link * SetInventory#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} * must be called to initialize this instance immediately after invoking the constructor.

* * @param name Immutable. Full resource name of the product, such as * `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/produ * ct_id`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetInventoryRequest} * @since 1.13 */ protected SetInventory(java.lang.String name, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SetInventoryRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } } @Override public SetInventory set$Xgafv(java.lang.String $Xgafv) { return (SetInventory) super.set$Xgafv($Xgafv); } @Override public SetInventory setAccessToken(java.lang.String accessToken) { return (SetInventory) super.setAccessToken(accessToken); } @Override public SetInventory setAlt(java.lang.String alt) { return (SetInventory) super.setAlt(alt); } @Override public SetInventory setCallback(java.lang.String callback) { return (SetInventory) super.setCallback(callback); } @Override public SetInventory setFields(java.lang.String fields) { return (SetInventory) super.setFields(fields); } @Override public SetInventory setKey(java.lang.String key) { return (SetInventory) super.setKey(key); } @Override public SetInventory setOauthToken(java.lang.String oauthToken) { return (SetInventory) super.setOauthToken(oauthToken); } @Override public SetInventory setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetInventory) super.setPrettyPrint(prettyPrint); } @Override public SetInventory setQuotaUser(java.lang.String quotaUser) { return (SetInventory) super.setQuotaUser(quotaUser); } @Override public SetInventory setUploadType(java.lang.String uploadType) { return (SetInventory) super.setUploadType(uploadType); } @Override public SetInventory setUploadProtocol(java.lang.String uploadProtocol) { return (SetInventory) super.setUploadProtocol(uploadProtocol); } /** * Immutable. Full resource name of the product, such as `projects/locations/global/ca * talogs/default_catalog/branches/default_branch/products/product_id`. */ @com.google.api.client.util.Key private java.lang.String name; /** Immutable. Full resource name of the product, such as `projects/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. */ public java.lang.String getName() { return name; } /** * Immutable. Full resource name of the product, such as `projects/locations/global/ca * talogs/default_catalog/branches/default_branch/products/product_id`. */ public SetInventory setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$"); } this.name = name; return this; } @Override public SetInventory set(String parameterName, Object value) { return (SetInventory) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the CompletionData collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.CompletionData.List request = retail.completionData().list(parameters ...)}
         * 
* * @return the resource collection */ public CompletionData completionData() { return new CompletionData(); } /** * The "completionData" collection of methods. */ public class CompletionData { /** * Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating * is not supported. The operation is successfully finished only after the imported suggestions are * indexed successfully and ready for serving. The process takes hours. This feature is only * available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console * before using this feature. * * Create a request for the method "completionData.import". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. * * @param parent Required. The catalog which the suggestions dataset belongs to. Format: * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportCompletionDataRequest} * @return the request */ public CloudRetailImport retailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportCompletionDataRequest content) throws java.io.IOException { CloudRetailImport result = new CloudRetailImport(parent, content); initialize(result); return result; } public class CloudRetailImport extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/completionData:import"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Bulk import of processed completion dataset. Request processing is asynchronous. Partial * updating is not supported. The operation is successfully finished only after the imported * suggestions are indexed successfully and ready for serving. The process takes hours. This * feature is only available for users who have Retail Search enabled. Please enable Retail Search * on Cloud Console before using this feature. * * Create a request for the method "completionData.import". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. *

{@link CloudRetailImport#initialize(com.google.api.client.googleapis.services.AbstractGoogl * eClientRequest)} must be called to initialize this instance immediately after invoking the * constructor.

* * @param parent Required. The catalog which the suggestions dataset belongs to. Format: * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportCompletionDataRequest} * @since 1.13 */ protected CloudRetailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportCompletionDataRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public CloudRetailImport set$Xgafv(java.lang.String $Xgafv) { return (CloudRetailImport) super.set$Xgafv($Xgafv); } @Override public CloudRetailImport setAccessToken(java.lang.String accessToken) { return (CloudRetailImport) super.setAccessToken(accessToken); } @Override public CloudRetailImport setAlt(java.lang.String alt) { return (CloudRetailImport) super.setAlt(alt); } @Override public CloudRetailImport setCallback(java.lang.String callback) { return (CloudRetailImport) super.setCallback(callback); } @Override public CloudRetailImport setFields(java.lang.String fields) { return (CloudRetailImport) super.setFields(fields); } @Override public CloudRetailImport setKey(java.lang.String key) { return (CloudRetailImport) super.setKey(key); } @Override public CloudRetailImport setOauthToken(java.lang.String oauthToken) { return (CloudRetailImport) super.setOauthToken(oauthToken); } @Override public CloudRetailImport setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloudRetailImport) super.setPrettyPrint(prettyPrint); } @Override public CloudRetailImport setQuotaUser(java.lang.String quotaUser) { return (CloudRetailImport) super.setQuotaUser(quotaUser); } @Override public CloudRetailImport setUploadType(java.lang.String uploadType) { return (CloudRetailImport) super.setUploadType(uploadType); } @Override public CloudRetailImport setUploadProtocol(java.lang.String uploadProtocol) { return (CloudRetailImport) super.setUploadProtocol(uploadProtocol); } /** * Required. The catalog which the suggestions dataset belongs to. Format: * `projects/1234/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The catalog which the suggestions dataset belongs to. Format: `projects/1234/locations/global/catalogs/default_catalog`. */ public java.lang.String getParent() { return parent; } /** * Required. The catalog which the suggestions dataset belongs to. Format: * `projects/1234/locations/global/catalogs/default_catalog`. */ public CloudRetailImport setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } @Override public CloudRetailImport set(String parameterName, Object value) { return (CloudRetailImport) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.Operations.List request = retail.operations().list(parameters ...)}
         * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name The name of the operation resource. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$"); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override * the binding to use different resource name schemes, such as `users/operations`. To override the * binding, API services can add a binding such as `"/v1/{name=users}/operations"` to their service * configuration. For backwards compatibility, the default name includes the operations collection * id, however overriding users must ensure the name binding is the parent resource, without the * operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param name The name of the operation's parent resource. * @return the request */ public List list(java.lang.String name) throws java.io.IOException { List result = new List(name); initialize(result); return result; } public class List extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}/operations"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to * override the binding to use different resource name schemes, such as `users/operations`. To * override the binding, API services can add a binding such as `"/v1/{name=users}/operations"` to * their service configuration. For backwards compatibility, the default name includes the * operations collection id, however overriding users must ensure the name binding is the parent * resource, without the operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation's parent resource. * @since 1.13 */ protected List(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningListOperationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The name of the operation's parent resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation's parent resource. */ public java.lang.String getName() { return name; } /** The name of the operation's parent resource. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.name = name; return this; } /** The standard list filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** The standard list filter. */ public java.lang.String getFilter() { return filter; } /** The standard list filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** The standard list page size. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The standard list page size. */ public java.lang.Integer getPageSize() { return pageSize; } /** The standard list page size. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The standard list page token. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The standard list page token. */ public java.lang.String getPageToken() { return pageToken; } /** The standard list page token. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Placements collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.Placements.List request = retail.placements().list(parameters ...)}
         * 
* * @return the resource collection */ public Placements placements() { return new Placements(); } /** * The "placements" collection of methods. */ public class Placements { /** * Makes a recommendation prediction. * * Create a request for the method "placements.predict". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Predict#execute()} method to invoke the remote operation. * * @param placement Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend * using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the * Recommendations AI serving config or placement. Before you can request predictions from * your model, you must create at least one serving config or placement for it. For more * information, see [Managing serving configurations] (https://cloud.google.com/retail/docs * /manage-configs). The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest} * @return the request */ public Predict predict(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest content) throws java.io.IOException { Predict result = new Predict(placement, content); initialize(result); return result; } public class Predict extends CloudRetailRequest { private static final String REST_PATH = "v2/{+placement}:predict"; private final java.util.regex.Pattern PLACEMENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); /** * Makes a recommendation prediction. * * Create a request for the method "placements.predict". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Predict#execute()} method to invoke the remote operation.

* {@link * Predict#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param placement Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend * using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the * Recommendations AI serving config or placement. Before you can request predictions from * your model, you must create at least one serving config or placement for it. For more * information, see [Managing serving configurations] (https://cloud.google.com/retail/docs * /manage-configs). The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest} * @since 1.13 */ protected Predict(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictResponse.class); this.placement = com.google.api.client.util.Preconditions.checkNotNull(placement, "Required parameter placement must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); } } @Override public Predict set$Xgafv(java.lang.String $Xgafv) { return (Predict) super.set$Xgafv($Xgafv); } @Override public Predict setAccessToken(java.lang.String accessToken) { return (Predict) super.setAccessToken(accessToken); } @Override public Predict setAlt(java.lang.String alt) { return (Predict) super.setAlt(alt); } @Override public Predict setCallback(java.lang.String callback) { return (Predict) super.setCallback(callback); } @Override public Predict setFields(java.lang.String fields) { return (Predict) super.setFields(fields); } @Override public Predict setKey(java.lang.String key) { return (Predict) super.setKey(key); } @Override public Predict setOauthToken(java.lang.String oauthToken) { return (Predict) super.setOauthToken(oauthToken); } @Override public Predict setPrettyPrint(java.lang.Boolean prettyPrint) { return (Predict) super.setPrettyPrint(prettyPrint); } @Override public Predict setQuotaUser(java.lang.String quotaUser) { return (Predict) super.setQuotaUser(quotaUser); } @Override public Predict setUploadType(java.lang.String uploadType) { return (Predict) super.setUploadType(uploadType); } @Override public Predict setUploadProtocol(java.lang.String uploadProtocol) { return (Predict) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We * recommend using the `servingConfigs` resource. `placements` is a legacy resource. The * ID of the Recommendations AI serving config or placement. Before you can request * predictions from your model, you must create at least one serving config or placement * for it. For more information, see [Managing serving configurations] * (https://cloud.google.com/retail/docs/manage-configs). The full list of available * serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ @com.google.api.client.util.Key private java.lang.String placement; /** Required. Full resource name of the format: {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ public java.lang.String getPlacement() { return placement; } /** * Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We * recommend using the `servingConfigs` resource. `placements` is a legacy resource. The * ID of the Recommendations AI serving config or placement. Before you can request * predictions from your model, you must create at least one serving config or placement * for it. For more information, see [Managing serving configurations] * (https://cloud.google.com/retail/docs/manage-configs). The full list of available * serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ public Predict setPlacement(java.lang.String placement) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); } this.placement = placement; return this; } @Override public Predict set(String parameterName, Object value) { return (Predict) super.set(parameterName, value); } } /** * Performs a search. This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "placements.search". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Search#execute()} method to invoke the remote operation. * * @param placement Required. The resource name of the Retail Search serving config, such as * `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field * is used to identify the serving configuration name and the set of models that will be used * to make the search. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest} * @return the request */ public Search search(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest content) throws java.io.IOException { Search result = new Search(placement, content); initialize(result); return result; } public class Search extends CloudRetailRequest { private static final String REST_PATH = "v2/{+placement}:search"; private final java.util.regex.Pattern PLACEMENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); /** * Performs a search. This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "placements.search". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Search#execute()} method to invoke the remote operation.

{@link * Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param placement Required. The resource name of the Retail Search serving config, such as * `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field * is used to identify the serving configuration name and the set of models that will be used * to make the search. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest} * @since 1.13 */ protected Search(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchResponse.class); this.placement = com.google.api.client.util.Preconditions.checkNotNull(placement, "Required parameter placement must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); } } @Override public Search set$Xgafv(java.lang.String $Xgafv) { return (Search) super.set$Xgafv($Xgafv); } @Override public Search setAccessToken(java.lang.String accessToken) { return (Search) super.setAccessToken(accessToken); } @Override public Search setAlt(java.lang.String alt) { return (Search) super.setAlt(alt); } @Override public Search setCallback(java.lang.String callback) { return (Search) super.setCallback(callback); } @Override public Search setFields(java.lang.String fields) { return (Search) super.setFields(fields); } @Override public Search setKey(java.lang.String key) { return (Search) super.setKey(key); } @Override public Search setOauthToken(java.lang.String oauthToken) { return (Search) super.setOauthToken(oauthToken); } @Override public Search setPrettyPrint(java.lang.Boolean prettyPrint) { return (Search) super.setPrettyPrint(prettyPrint); } @Override public Search setQuotaUser(java.lang.String quotaUser) { return (Search) super.setQuotaUser(quotaUser); } @Override public Search setUploadType(java.lang.String uploadType) { return (Search) super.setUploadType(uploadType); } @Override public Search setUploadProtocol(java.lang.String uploadProtocol) { return (Search) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the Retail Search serving config, such as `projects/lo * cations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the * name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This * field is used to identify the serving configuration name and the set of models that * will be used to make the search. */ @com.google.api.client.util.Key private java.lang.String placement; /** Required. The resource name of the Retail Search serving config, such as `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search. */ public java.lang.String getPlacement() { return placement; } /** * Required. The resource name of the Retail Search serving config, such as `projects/lo * cations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the * name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This * field is used to identify the serving configuration name and the set of models that * will be used to make the search. */ public Search setPlacement(java.lang.String placement) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$"); } this.placement = placement; return this; } @Override public Search set(String parameterName, Object value) { return (Search) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ServingConfigs collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.ServingConfigs.List request = retail.servingConfigs().list(parameters ...)}
         * 
* * @return the resource collection */ public ServingConfigs servingConfigs() { return new ServingConfigs(); } /** * The "servingConfigs" collection of methods. */ public class ServingConfigs { /** * Makes a recommendation prediction. * * Create a request for the method "servingConfigs.predict". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Predict#execute()} method to invoke the remote operation. * * @param placement Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend * using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the * Recommendations AI serving config or placement. Before you can request predictions from * your model, you must create at least one serving config or placement for it. For more * information, see [Managing serving configurations] (https://cloud.google.com/retail/docs * /manage-configs). The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest} * @return the request */ public Predict predict(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest content) throws java.io.IOException { Predict result = new Predict(placement, content); initialize(result); return result; } public class Predict extends CloudRetailRequest { private static final String REST_PATH = "v2/{+placement}:predict"; private final java.util.regex.Pattern PLACEMENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); /** * Makes a recommendation prediction. * * Create a request for the method "servingConfigs.predict". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Predict#execute()} method to invoke the remote operation.

* {@link * Predict#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param placement Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend * using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the * Recommendations AI serving config or placement. Before you can request predictions from * your model, you must create at least one serving config or placement for it. For more * information, see [Managing serving configurations] (https://cloud.google.com/retail/docs * /manage-configs). The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest} * @since 1.13 */ protected Predict(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PredictResponse.class); this.placement = com.google.api.client.util.Preconditions.checkNotNull(placement, "Required parameter placement must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); } } @Override public Predict set$Xgafv(java.lang.String $Xgafv) { return (Predict) super.set$Xgafv($Xgafv); } @Override public Predict setAccessToken(java.lang.String accessToken) { return (Predict) super.setAccessToken(accessToken); } @Override public Predict setAlt(java.lang.String alt) { return (Predict) super.setAlt(alt); } @Override public Predict setCallback(java.lang.String callback) { return (Predict) super.setCallback(callback); } @Override public Predict setFields(java.lang.String fields) { return (Predict) super.setFields(fields); } @Override public Predict setKey(java.lang.String key) { return (Predict) super.setKey(key); } @Override public Predict setOauthToken(java.lang.String oauthToken) { return (Predict) super.setOauthToken(oauthToken); } @Override public Predict setPrettyPrint(java.lang.Boolean prettyPrint) { return (Predict) super.setPrettyPrint(prettyPrint); } @Override public Predict setQuotaUser(java.lang.String quotaUser) { return (Predict) super.setQuotaUser(quotaUser); } @Override public Predict setUploadType(java.lang.String uploadType) { return (Predict) super.setUploadType(uploadType); } @Override public Predict setUploadProtocol(java.lang.String uploadProtocol) { return (Predict) super.setUploadProtocol(uploadProtocol); } /** * Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We * recommend using the `servingConfigs` resource. `placements` is a legacy resource. The * ID of the Recommendations AI serving config or placement. Before you can request * predictions from your model, you must create at least one serving config or placement * for it. For more information, see [Managing serving configurations] * (https://cloud.google.com/retail/docs/manage-configs). The full list of available * serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ @com.google.api.client.util.Key private java.lang.String placement; /** Required. Full resource name of the format: {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ public java.lang.String getPlacement() { return placement; } /** * Required. Full resource name of the format: * {placement=projects/locations/global/catalogs/default_catalog/servingConfigs} or * {placement=projects/locations/global/catalogs/default_catalog/placements}. We * recommend using the `servingConfigs` resource. `placements` is a legacy resource. The * ID of the Recommendations AI serving config or placement. Before you can request * predictions from your model, you must create at least one serving config or placement * for it. For more information, see [Managing serving configurations] * (https://cloud.google.com/retail/docs/manage-configs). The full list of available * serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs */ public Predict setPlacement(java.lang.String placement) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); } this.placement = placement; return this; } @Override public Predict set(String parameterName, Object value) { return (Predict) super.set(parameterName, value); } } /** * Performs a search. This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "servingConfigs.search". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Search#execute()} method to invoke the remote operation. * * @param placement Required. The resource name of the Retail Search serving config, such as * `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field * is used to identify the serving configuration name and the set of models that will be used * to make the search. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest} * @return the request */ public Search search(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest content) throws java.io.IOException { Search result = new Search(placement, content); initialize(result); return result; } public class Search extends CloudRetailRequest { private static final String REST_PATH = "v2/{+placement}:search"; private final java.util.regex.Pattern PLACEMENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); /** * Performs a search. This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * * Create a request for the method "servingConfigs.search". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Search#execute()} method to invoke the remote operation.

{@link * Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param placement Required. The resource name of the Retail Search serving config, such as * `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field * is used to identify the serving configuration name and the set of models that will be used * to make the search. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest} * @since 1.13 */ protected Search(java.lang.String placement, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2SearchResponse.class); this.placement = com.google.api.client.util.Preconditions.checkNotNull(placement, "Required parameter placement must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); } } @Override public Search set$Xgafv(java.lang.String $Xgafv) { return (Search) super.set$Xgafv($Xgafv); } @Override public Search setAccessToken(java.lang.String accessToken) { return (Search) super.setAccessToken(accessToken); } @Override public Search setAlt(java.lang.String alt) { return (Search) super.setAlt(alt); } @Override public Search setCallback(java.lang.String callback) { return (Search) super.setCallback(callback); } @Override public Search setFields(java.lang.String fields) { return (Search) super.setFields(fields); } @Override public Search setKey(java.lang.String key) { return (Search) super.setKey(key); } @Override public Search setOauthToken(java.lang.String oauthToken) { return (Search) super.setOauthToken(oauthToken); } @Override public Search setPrettyPrint(java.lang.Boolean prettyPrint) { return (Search) super.setPrettyPrint(prettyPrint); } @Override public Search setQuotaUser(java.lang.String quotaUser) { return (Search) super.setQuotaUser(quotaUser); } @Override public Search setUploadType(java.lang.String uploadType) { return (Search) super.setUploadType(uploadType); } @Override public Search setUploadProtocol(java.lang.String uploadProtocol) { return (Search) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the Retail Search serving config, such as `projects/lo * cations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the * name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This * field is used to identify the serving configuration name and the set of models that * will be used to make the search. */ @com.google.api.client.util.Key private java.lang.String placement; /** Required. The resource name of the Retail Search serving config, such as `projects/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search. */ public java.lang.String getPlacement() { return placement; } /** * Required. The resource name of the Retail Search serving config, such as `projects/lo * cations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the * name of the legacy placement resource, such as * `projects/locations/global/catalogs/default_catalog/placements/default_search`. This * field is used to identify the serving configuration name and the set of models that * will be used to make the search. */ public Search setPlacement(java.lang.String placement) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PLACEMENT_PATTERN.matcher(placement).matches(), "Parameter placement must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$"); } this.placement = placement; return this; } @Override public Search set(String parameterName, Object value) { return (Search) super.set(parameterName, value); } } } /** * An accessor for creating requests from the UserEvents collection. * *

The typical use is:

*
         *   {@code CloudRetail retail = new CloudRetail(...);}
         *   {@code CloudRetail.UserEvents.List request = retail.userEvents().list(parameters ...)}
         * 
* * @return the resource collection */ public UserEvents userEvents() { return new UserEvents(); } /** * The "userEvents" collection of methods. */ public class UserEvents { /** * Writes a single user event from the browser. This uses a GET request to due to browser * restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API * JavaScript pixel and Google Tag Manager. Users should not call this method directly. * * Create a request for the method "userEvents.collect". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Collect#execute()} method to invoke the remote operation. * * @param parent Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @return the request */ public Collect collect(java.lang.String parent) throws java.io.IOException { Collect result = new Collect(parent); initialize(result); return result; } public class Collect extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/userEvents:collect"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Writes a single user event from the browser. This uses a GET request to due to browser * restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API * JavaScript pixel and Google Tag Manager. Users should not call this method directly. * * Create a request for the method "userEvents.collect". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Collect#execute()} method to invoke the remote operation.

* {@link * Collect#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @since 1.13 */ protected Collect(java.lang.String parent) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleApiHttpBody.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Collect set$Xgafv(java.lang.String $Xgafv) { return (Collect) super.set$Xgafv($Xgafv); } @Override public Collect setAccessToken(java.lang.String accessToken) { return (Collect) super.setAccessToken(accessToken); } @Override public Collect setAlt(java.lang.String alt) { return (Collect) super.setAlt(alt); } @Override public Collect setCallback(java.lang.String callback) { return (Collect) super.setCallback(callback); } @Override public Collect setFields(java.lang.String fields) { return (Collect) super.setFields(fields); } @Override public Collect setKey(java.lang.String key) { return (Collect) super.setKey(key); } @Override public Collect setOauthToken(java.lang.String oauthToken) { return (Collect) super.setOauthToken(oauthToken); } @Override public Collect setPrettyPrint(java.lang.Boolean prettyPrint) { return (Collect) super.setPrettyPrint(prettyPrint); } @Override public Collect setQuotaUser(java.lang.String quotaUser) { return (Collect) super.setQuotaUser(quotaUser); } @Override public Collect setUploadType(java.lang.String uploadType) { return (Collect) super.setUploadType(uploadType); } @Override public Collect setUploadProtocol(java.lang.String uploadProtocol) { return (Collect) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ public Collect setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } /** * The event timestamp in milliseconds. This prevents browser caching of otherwise * identical get requests. The name is abbreviated to reduce the payload bytes. */ @com.google.api.client.util.Key private java.lang.Long ets; /** The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. */ public java.lang.Long getEts() { return ets; } /** * The event timestamp in milliseconds. This prevents browser caching of otherwise * identical get requests. The name is abbreviated to reduce the payload bytes. */ public Collect setEts(java.lang.Long ets) { this.ets = ets; return this; } /** * The URL including cgi-parameters but excluding the hash fragment with a length limit * of 5,000 characters. This is often more useful than the referer URL, because many * browsers only send the domain for 3rd party requests. */ @com.google.api.client.util.Key private java.lang.String uri; /** The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests. */ public java.lang.String getUri() { return uri; } /** * The URL including cgi-parameters but excluding the hash fragment with a length limit * of 5,000 characters. This is often more useful than the referer URL, because many * browsers only send the domain for 3rd party requests. */ public Collect setUri(java.lang.String uri) { this.uri = uri; return this; } /** * Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. */ @com.google.api.client.util.Key private java.lang.String userEvent; /** Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. */ public java.lang.String getUserEvent() { return userEvent; } /** * Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. */ public Collect setUserEvent(java.lang.String userEvent) { this.userEvent = userEvent; return this; } @Override public Collect set(String parameterName, Object value) { return (Collect) super.set(parameterName, value); } } /** * Bulk import of User events. Request processing might be synchronous. Events that already exist * are skipped. Use this method for backfilling historical user events. Operation.response is of * type ImportResponse. Note that it is possible for a subset of the items to be successfully * inserted. Operation.metadata is of type ImportMetadata. * * Create a request for the method "userEvents.import". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. * * @param parent Required. `projects/1234/locations/global/catalogs/default_catalog` * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportUserEventsRequest} * @return the request */ public CloudRetailImport retailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportUserEventsRequest content) throws java.io.IOException { CloudRetailImport result = new CloudRetailImport(parent, content); initialize(result); return result; } public class CloudRetailImport extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/userEvents:import"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Bulk import of User events. Request processing might be synchronous. Events that already exist * are skipped. Use this method for backfilling historical user events. Operation.response is of * type ImportResponse. Note that it is possible for a subset of the items to be successfully * inserted. Operation.metadata is of type ImportMetadata. * * Create a request for the method "userEvents.import". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link CloudRetailImport#execute()} method to invoke the remote operation. *

{@link CloudRetailImport#initialize(com.google.api.client.googleapis.services.AbstractGoogl * eClientRequest)} must be called to initialize this instance immediately after invoking the * constructor.

* * @param parent Required. `projects/1234/locations/global/catalogs/default_catalog` * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportUserEventsRequest} * @since 1.13 */ protected CloudRetailImport(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2ImportUserEventsRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public CloudRetailImport set$Xgafv(java.lang.String $Xgafv) { return (CloudRetailImport) super.set$Xgafv($Xgafv); } @Override public CloudRetailImport setAccessToken(java.lang.String accessToken) { return (CloudRetailImport) super.setAccessToken(accessToken); } @Override public CloudRetailImport setAlt(java.lang.String alt) { return (CloudRetailImport) super.setAlt(alt); } @Override public CloudRetailImport setCallback(java.lang.String callback) { return (CloudRetailImport) super.setCallback(callback); } @Override public CloudRetailImport setFields(java.lang.String fields) { return (CloudRetailImport) super.setFields(fields); } @Override public CloudRetailImport setKey(java.lang.String key) { return (CloudRetailImport) super.setKey(key); } @Override public CloudRetailImport setOauthToken(java.lang.String oauthToken) { return (CloudRetailImport) super.setOauthToken(oauthToken); } @Override public CloudRetailImport setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloudRetailImport) super.setPrettyPrint(prettyPrint); } @Override public CloudRetailImport setQuotaUser(java.lang.String quotaUser) { return (CloudRetailImport) super.setQuotaUser(quotaUser); } @Override public CloudRetailImport setUploadType(java.lang.String uploadType) { return (CloudRetailImport) super.setUploadType(uploadType); } @Override public CloudRetailImport setUploadProtocol(java.lang.String uploadProtocol) { return (CloudRetailImport) super.setUploadProtocol(uploadProtocol); } /** Required. `projects/1234/locations/global/catalogs/default_catalog` */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. `projects/1234/locations/global/catalogs/default_catalog` */ public java.lang.String getParent() { return parent; } /** Required. `projects/1234/locations/global/catalogs/default_catalog` */ public CloudRetailImport setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } @Override public CloudRetailImport set(String parameterName, Object value) { return (CloudRetailImport) super.set(parameterName, value); } } /** * Deletes permanently all user events specified by the filter provided. Depending on the number of * events specified by the filter, this operation could take hours or days to complete. To test a * filter, use the list command first. * * Create a request for the method "userEvents.purge". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Purge#execute()} method to invoke the remote operation. * * @param parent Required. The resource name of the catalog under which the events are created. The format is * `projects/${projectId}/locations/global/catalogs/${catalogId}` * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PurgeUserEventsRequest} * @return the request */ public Purge purge(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PurgeUserEventsRequest content) throws java.io.IOException { Purge result = new Purge(parent, content); initialize(result); return result; } public class Purge extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/userEvents:purge"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Deletes permanently all user events specified by the filter provided. Depending on the number * of events specified by the filter, this operation could take hours or days to complete. To test * a filter, use the list command first. * * Create a request for the method "userEvents.purge". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Purge#execute()} method to invoke the remote operation.

{@link * Purge#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The resource name of the catalog under which the events are created. The format is * `projects/${projectId}/locations/global/catalogs/${catalogId}` * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2PurgeUserEventsRequest} * @since 1.13 */ protected Purge(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2PurgeUserEventsRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public Purge set$Xgafv(java.lang.String $Xgafv) { return (Purge) super.set$Xgafv($Xgafv); } @Override public Purge setAccessToken(java.lang.String accessToken) { return (Purge) super.setAccessToken(accessToken); } @Override public Purge setAlt(java.lang.String alt) { return (Purge) super.setAlt(alt); } @Override public Purge setCallback(java.lang.String callback) { return (Purge) super.setCallback(callback); } @Override public Purge setFields(java.lang.String fields) { return (Purge) super.setFields(fields); } @Override public Purge setKey(java.lang.String key) { return (Purge) super.setKey(key); } @Override public Purge setOauthToken(java.lang.String oauthToken) { return (Purge) super.setOauthToken(oauthToken); } @Override public Purge setPrettyPrint(java.lang.Boolean prettyPrint) { return (Purge) super.setPrettyPrint(prettyPrint); } @Override public Purge setQuotaUser(java.lang.String quotaUser) { return (Purge) super.setQuotaUser(quotaUser); } @Override public Purge setUploadType(java.lang.String uploadType) { return (Purge) super.setUploadType(uploadType); } @Override public Purge setUploadProtocol(java.lang.String uploadProtocol) { return (Purge) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the catalog under which the events are created. The * format is `projects/${projectId}/locations/global/catalogs/${catalogId}` */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}` */ public java.lang.String getParent() { return parent; } /** * Required. The resource name of the catalog under which the events are created. The * format is `projects/${projectId}/locations/global/catalogs/${catalogId}` */ public Purge setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } @Override public Purge set(String parameterName, Object value) { return (Purge) super.set(parameterName, value); } } /** * Starts a user event rejoin operation with latest product catalog. Events will not be annotated * with detailed product information if product is missing from the catalog at the time the user * event is ingested, and these events are stored as unjoined events with a limited usage on * training and serving. This method can be used to start a join operation on specified events with * latest version of product catalog. It can also be used to correct events joined with the wrong * product catalog. A rejoin operation can take hours or days to complete. * * Create a request for the method "userEvents.rejoin". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Rejoin#execute()} method to invoke the remote operation. * * @param parent Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RejoinUserEventsRequest} * @return the request */ public Rejoin rejoin(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RejoinUserEventsRequest content) throws java.io.IOException { Rejoin result = new Rejoin(parent, content); initialize(result); return result; } public class Rejoin extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/userEvents:rejoin"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Starts a user event rejoin operation with latest product catalog. Events will not be annotated * with detailed product information if product is missing from the catalog at the time the user * event is ingested, and these events are stored as unjoined events with a limited usage on * training and serving. This method can be used to start a join operation on specified events * with latest version of product catalog. It can also be used to correct events joined with the * wrong product catalog. A rejoin operation can take hours or days to complete. * * Create a request for the method "userEvents.rejoin". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Rejoin#execute()} method to invoke the remote operation.

{@link * Rejoin#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2RejoinUserEventsRequest} * @since 1.13 */ protected Rejoin(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2RejoinUserEventsRequest content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public Rejoin set$Xgafv(java.lang.String $Xgafv) { return (Rejoin) super.set$Xgafv($Xgafv); } @Override public Rejoin setAccessToken(java.lang.String accessToken) { return (Rejoin) super.setAccessToken(accessToken); } @Override public Rejoin setAlt(java.lang.String alt) { return (Rejoin) super.setAlt(alt); } @Override public Rejoin setCallback(java.lang.String callback) { return (Rejoin) super.setCallback(callback); } @Override public Rejoin setFields(java.lang.String fields) { return (Rejoin) super.setFields(fields); } @Override public Rejoin setKey(java.lang.String key) { return (Rejoin) super.setKey(key); } @Override public Rejoin setOauthToken(java.lang.String oauthToken) { return (Rejoin) super.setOauthToken(oauthToken); } @Override public Rejoin setPrettyPrint(java.lang.Boolean prettyPrint) { return (Rejoin) super.setPrettyPrint(prettyPrint); } @Override public Rejoin setQuotaUser(java.lang.String quotaUser) { return (Rejoin) super.setQuotaUser(quotaUser); } @Override public Rejoin setUploadType(java.lang.String uploadType) { return (Rejoin) super.setUploadType(uploadType); } @Override public Rejoin setUploadProtocol(java.lang.String uploadProtocol) { return (Rejoin) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ public Rejoin setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } @Override public Rejoin set(String parameterName, Object value) { return (Rejoin) super.set(parameterName, value); } } /** * Writes a single user event. * * Create a request for the method "userEvents.write". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Write#execute()} method to invoke the remote operation. * * @param parent Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2UserEvent} * @return the request */ public Write write(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2UserEvent content) throws java.io.IOException { Write result = new Write(parent, content); initialize(result); return result; } public class Write extends CloudRetailRequest { private static final String REST_PATH = "v2/{+parent}/userEvents:write"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); /** * Writes a single user event. * * Create a request for the method "userEvents.write". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Write#execute()} method to invoke the remote operation.

{@link * Write#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param parent Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2UserEvent} * @since 1.13 */ protected Write(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2UserEvent content) { super(CloudRetail.this, "POST", REST_PATH, content, com.google.api.services.retail.v2.model.GoogleCloudRetailV2UserEvent.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } } @Override public Write set$Xgafv(java.lang.String $Xgafv) { return (Write) super.set$Xgafv($Xgafv); } @Override public Write setAccessToken(java.lang.String accessToken) { return (Write) super.setAccessToken(accessToken); } @Override public Write setAlt(java.lang.String alt) { return (Write) super.setAlt(alt); } @Override public Write setCallback(java.lang.String callback) { return (Write) super.setCallback(callback); } @Override public Write setFields(java.lang.String fields) { return (Write) super.setFields(fields); } @Override public Write setKey(java.lang.String key) { return (Write) super.setKey(key); } @Override public Write setOauthToken(java.lang.String oauthToken) { return (Write) super.setOauthToken(oauthToken); } @Override public Write setPrettyPrint(java.lang.Boolean prettyPrint) { return (Write) super.setPrettyPrint(prettyPrint); } @Override public Write setQuotaUser(java.lang.String quotaUser) { return (Write) super.setQuotaUser(quotaUser); } @Override public Write setUploadType(java.lang.String uploadType) { return (Write) super.setUploadType(uploadType); } @Override public Write setUploadProtocol(java.lang.String uploadProtocol) { return (Write) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent catalog resource name, such as * `projects/1234/locations/global/catalogs/default_catalog`. */ public Write setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$"); } this.parent = parent; return this; } @Override public Write set(String parameterName, Object value) { return (Write) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
       *   {@code CloudRetail retail = new CloudRetail(...);}
       *   {@code CloudRetail.Operations.List request = retail.operations().list(parameters ...)}
       * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name The name of the operation resource. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override * the binding to use different resource name schemes, such as `users/operations`. To override the * binding, API services can add a binding such as `"/v1/{name=users}/operations"` to their service * configuration. For backwards compatibility, the default name includes the operations collection * id, however overriding users must ensure the name binding is the parent resource, without the * operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param name The name of the operation's parent resource. * @return the request */ public List list(java.lang.String name) throws java.io.IOException { List result = new List(name); initialize(result); return result; } public class List extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}/operations"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to * override the binding to use different resource name schemes, such as `users/operations`. To * override the binding, API services can add a binding such as `"/v1/{name=users}/operations"` to * their service configuration. For backwards compatibility, the default name includes the * operations collection id, however overriding users must ensure the name binding is the parent * resource, without the operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation's parent resource. * @since 1.13 */ protected List(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningListOperationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The name of the operation's parent resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation's parent resource. */ public java.lang.String getName() { return name; } /** The name of the operation's parent resource. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.name = name; return this; } /** The standard list filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** The standard list filter. */ public java.lang.String getFilter() { return filter; } /** The standard list filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** The standard list page size. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The standard list page size. */ public java.lang.Integer getPageSize() { return pageSize; } /** The standard list page size. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The standard list page token. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The standard list page token. */ public java.lang.String getPageToken() { return pageToken; } /** The standard list page token. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
     *   {@code CloudRetail retail = new CloudRetail(...);}
     *   {@code CloudRetail.Operations.List request = retail.operations().list(parameters ...)}
     * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name The name of the operation resource. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/operations/[^/]+$"); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation resource. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningOperation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override * the binding to use different resource name schemes, such as `users/operations`. To override the * binding, API services can add a binding such as `"/v1/{name=users}/operations"` to their service * configuration. For backwards compatibility, the default name includes the operations collection * id, however overriding users must ensure the name binding is the parent resource, without the * operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param name The name of the operation's parent resource. * @return the request */ public List list(java.lang.String name) throws java.io.IOException { List result = new List(name); initialize(result); return result; } public class List extends CloudRetailRequest { private static final String REST_PATH = "v2/{+name}/operations"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+$"); /** * Lists operations that match the specified filter in the request. If the server doesn't support * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to * override the binding to use different resource name schemes, such as `users/operations`. To * override the binding, API services can add a binding such as `"/v1/{name=users}/operations"` to * their service configuration. For backwards compatibility, the default name includes the * operations collection id, however overriding users must ensure the name binding is the parent * resource, without the operations collection id. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the the retail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be * called to initialize this instance immediately after invoking the constructor.

* * @param name The name of the operation's parent resource. * @since 1.13 */ protected List(java.lang.String name) { super(CloudRetail.this, "GET", REST_PATH, null, com.google.api.services.retail.v2.model.GoogleLongrunningListOperationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The name of the operation's parent resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation's parent resource. */ public java.lang.String getName() { return name; } /** The name of the operation's parent resource. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } this.name = name; return this; } /** The standard list filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** The standard list filter. */ public java.lang.String getFilter() { return filter; } /** The standard list filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** The standard list page size. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The standard list page size. */ public java.lang.Integer getPageSize() { return pageSize; } /** The standard list page size. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** The standard list page token. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The standard list page token. */ public java.lang.String getPageToken() { return pageToken; } /** The standard list page token. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } } /** * Builder for {@link CloudRetail}. * *

* Implementation is not thread-safe. *

* * @since 1.3.0 */ public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) { // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint. // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS. // Use the regular endpoint for all other cases. String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT"); useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint; if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) { return DEFAULT_MTLS_ROOT_URL; } return DEFAULT_ROOT_URL; } /** * Returns an instance of a new builder. * * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { super( transport, jsonFactory, Builder.chooseEndpoint(transport), DEFAULT_SERVICE_PATH, httpRequestInitializer, false); setBatchPath(DEFAULT_BATCH_PATH); } /** Builds a new instance of {@link CloudRetail}. */ @Override public CloudRetail build() { return new CloudRetail(this); } @Override public Builder setRootUrl(String rootUrl) { return (Builder) super.setRootUrl(rootUrl); } @Override public Builder setServicePath(String servicePath) { return (Builder) super.setServicePath(servicePath); } @Override public Builder setBatchPath(String batchPath) { return (Builder) super.setBatchPath(batchPath); } @Override public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); } @Override public Builder setApplicationName(String applicationName) { return (Builder) super.setApplicationName(applicationName); } @Override public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); } @Override public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); } @Override public Builder setSuppressAllChecks(boolean suppressAllChecks) { return (Builder) super.setSuppressAllChecks(suppressAllChecks); } /** * Set the {@link CloudRetailRequestInitializer}. * * @since 1.12 */ public Builder setCloudRetailRequestInitializer( CloudRetailRequestInitializer cloudretailRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(cloudretailRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy