diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/README.md b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/README.md new file mode 100644 index 00000000000..d0b444e43fd --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/README.md @@ -0,0 +1,44 @@ +# Merchant API Client Library for Java + +Programmatically manage your Merchant Center Accounts. + +This page contains information about getting started with the Merchant API +using the Google API Client Library for Java. In addition, you may be interested +in the following documentation: + +* Browse the [Javadoc reference for the Merchant API][javadoc] +* Read the [Developer's Guide for the Google API Client Library for Java][google-api-client]. +* Interact with this API in your browser using the [APIs Explorer for the Merchant API][api-explorer] + +## Installation + +### Maven + +Add the following lines to your `pom.xml` file: + +```xml + + + + com.google.apis + google-api-services-merchantapi + loyaltycustomers_v1-rev20260805-2.0.0 + + + +``` + +### Gradle + +```gradle +repositories { + mavenCentral() +} +dependencies { + implementation 'com.google.apis:google-api-services-merchantapi:loyaltycustomers_v1-rev20260805-2.0.0' +} +``` + +[javadoc]: https://googleapis.dev/java/google-api-services-merchantapi/latest/index.html +[google-api-client]: https://github.com/googleapis/google-api-java-client/ +[api-explorer]: https://developers.google.com/apis-explorer/#p/merchantapi/v1/ diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/Merchant.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/Merchant.java new file mode 100644 index 00000000000..ec071b3620d --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/Merchant.java @@ -0,0 +1,463 @@ +/* + * 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.merchantapi.loyaltycustomers_v1; + +/** + * Service definition for Merchant (loyaltycustomers_v1). + * + *

+ * Programmatically manage your Merchant Center Accounts. + *

+ * + *

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

+ * + *

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

+ * + * @since 1.3 + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public class Merchant 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))) || + com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION >= 2, + "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 " + + "2.0.0 of the Merchant 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://merchantapi.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://merchantapi.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: + * + * @param jsonFactory JSON factory, which may be: + * + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + * @since 1.7 + */ + public Merchant(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 + */ + Merchant(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 Accounts collection. + * + *

The typical use is:

+ *
+   *   {@code Merchant merchantapi = new Merchant(...);}
+   *   {@code Merchant.Accounts.List request = merchantapi.accounts().list(parameters ...)}
+   * 
+ * + * @return the resource collection + */ + public Accounts accounts() { + return new Accounts(); + } + + /** + * The "accounts" collection of methods. + */ + public class Accounts { + + /** + * An accessor for creating requests from the LoyaltyCustomers collection. + * + *

The typical use is:

+ *
+     *   {@code Merchant merchantapi = new Merchant(...);}
+     *   {@code Merchant.LoyaltyCustomers.List request = merchantapi.loyaltyCustomers().list(parameters ...)}
+     * 
+ * + * @return the resource collection + */ + public LoyaltyCustomers loyaltyCustomers() { + return new LoyaltyCustomers(); + } + + /** + * The "loyaltyCustomers" collection of methods. + */ + public class LoyaltyCustomers { + + /** + * Manages (inserts, updates, or removes) a customer's loyalty tier information. This method serves + * as a single interface for all changes to a customer's loyalty status. The specific action + * (insert, update, or remove) is determined by the current state of the merchant-to-customer + * association and the `loyalty_tier` value provided in the request. **Operation Logic:** * **Upsert + * (Insert/Update):** Providing any valid tier other than `NON_MEMBER` will associate the customer + * with that tier. If an association already exists, it will be updated; otherwise, a new one will + * be created. * **Removal:** Setting `loyalty_tier` to `NON_MEMBER` will remove any existing + * loyalty association for the customer. **Privacy Note:** To protect user privacy, this method + * consistently returns a `200 OK` status with a default `LoyaltyCustomer` response if the + * customer's identifier cannot be matched to a Google account or if the user has not opted into + * loyalty personalization. + * + * Create a request for the method "loyaltyCustomers.manage". + * + * This request holds the parameters needed by the merchantapi server. After setting any optional + * parameters, call the {@link Manage#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent account where this loyalty customer will be handled. Format: + * `accounts/{account}` + * @param content the {@link com.google.api.services.merchantapi.loyaltycustomers_v1.model.ManageLoyaltyCustomerMatchRequest} + * @return the request + */ + public Manage manage(java.lang.String parent, com.google.api.services.merchantapi.loyaltycustomers_v1.model.ManageLoyaltyCustomerMatchRequest content) throws java.io.IOException { + Manage result = new Manage(parent, content); + initialize(result); + return result; + } + + public class Manage extends MerchantRequest { + + private static final String REST_PATH = "loyaltyCustomers/v1/{+parent}/loyaltyCustomers:manage"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^accounts/[^/]+$"); + + /** + * Manages (inserts, updates, or removes) a customer's loyalty tier information. This method + * serves as a single interface for all changes to a customer's loyalty status. The specific + * action (insert, update, or remove) is determined by the current state of the merchant-to- + * customer association and the `loyalty_tier` value provided in the request. **Operation Logic:** + * * **Upsert (Insert/Update):** Providing any valid tier other than `NON_MEMBER` will associate + * the customer with that tier. If an association already exists, it will be updated; otherwise, a + * new one will be created. * **Removal:** Setting `loyalty_tier` to `NON_MEMBER` will remove any + * existing loyalty association for the customer. **Privacy Note:** To protect user privacy, this + * method consistently returns a `200 OK` status with a default `LoyaltyCustomer` response if the + * customer's identifier cannot be matched to a Google account or if the user has not opted into + * loyalty personalization. + * + * Create a request for the method "loyaltyCustomers.manage". + * + * This request holds the parameters needed by the the merchantapi server. After setting any + * optional parameters, call the {@link Manage#execute()} method to invoke the remote operation. + *

{@link + * Manage#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 account where this loyalty customer will be handled. Format: + * `accounts/{account}` + * @param content the {@link com.google.api.services.merchantapi.loyaltycustomers_v1.model.ManageLoyaltyCustomerMatchRequest} + * @since 1.13 + */ + protected Manage(java.lang.String parent, com.google.api.services.merchantapi.loyaltycustomers_v1.model.ManageLoyaltyCustomerMatchRequest content) { + super(Merchant.this, "POST", REST_PATH, content, com.google.api.services.merchantapi.loyaltycustomers_v1.model.ManageLoyaltyCustomerMatchResponse.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 " + + "^accounts/[^/]+$"); + } + } + + @Override + public Manage set$Xgafv(java.lang.String $Xgafv) { + return (Manage) super.set$Xgafv($Xgafv); + } + + @Override + public Manage setAccessToken(java.lang.String accessToken) { + return (Manage) super.setAccessToken(accessToken); + } + + @Override + public Manage setAlt(java.lang.String alt) { + return (Manage) super.setAlt(alt); + } + + @Override + public Manage setCallback(java.lang.String callback) { + return (Manage) super.setCallback(callback); + } + + @Override + public Manage setFields(java.lang.String fields) { + return (Manage) super.setFields(fields); + } + + @Override + public Manage setKey(java.lang.String key) { + return (Manage) super.setKey(key); + } + + @Override + public Manage setOauthToken(java.lang.String oauthToken) { + return (Manage) super.setOauthToken(oauthToken); + } + + @Override + public Manage setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Manage) super.setPrettyPrint(prettyPrint); + } + + @Override + public Manage setQuotaUser(java.lang.String quotaUser) { + return (Manage) super.setQuotaUser(quotaUser); + } + + @Override + public Manage setUploadType(java.lang.String uploadType) { + return (Manage) super.setUploadType(uploadType); + } + + @Override + public Manage setUploadProtocol(java.lang.String uploadProtocol) { + return (Manage) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent account where this loyalty customer will be handled. Format: + * `accounts/{account}` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent account where this loyalty customer will be handled. Format: + `accounts/{account}` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent account where this loyalty customer will be handled. Format: + * `accounts/{account}` + */ + public Manage 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 " + + "^accounts/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public Manage set(String parameterName, Object value) { + return (Manage) super.set(parameterName, value); + } + } + + } + } + + /** + * Builder for {@link Merchant}. + * + *

+ * 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: + * + * @param jsonFactory JSON factory, which may be: + * + * @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 Merchant}. */ + @Override + public Merchant build() { + return new Merchant(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 MerchantRequestInitializer}. + * + * @since 1.12 + */ + public Builder setMerchantRequestInitializer( + MerchantRequestInitializer merchantRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(merchantRequestInitializer); + } + + @Override + public Builder setGoogleClientRequestInitializer( + com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setUniverseDomain(String universeDomain) { + return (Builder) super.setUniverseDomain(universeDomain); + } + } +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequest.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequest.java new file mode 100644 index 00000000000..85574d513cd --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequest.java @@ -0,0 +1,267 @@ +/* + * 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.merchantapi.loyaltycustomers_v1; + +/** + * Merchant request. + * + * @since 1.3 + */ +@SuppressWarnings("javadoc") +public abstract class MerchantRequest extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { + + /** + * @param client Google client + * @param method HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} + * @param content A POJO that can be serialized into JSON or {@code null} for none + * @param responseClass response class to parse into + */ + public MerchantRequest( + Merchant client, String method, String uriTemplate, Object content, Class responseClass) { + super( + client, + method, + uriTemplate, + content, + responseClass); + } + + /** V1 error format. */ + @com.google.api.client.util.Key("$.xgafv") + private java.lang.String $Xgafv; + + /** + * V1 error format. + */ + public java.lang.String get$Xgafv() { + return $Xgafv; + } + + /** V1 error format. */ + public MerchantRequest set$Xgafv(java.lang.String $Xgafv) { + this.$Xgafv = $Xgafv; + return this; + } + + /** OAuth access token. */ + @com.google.api.client.util.Key("access_token") + private java.lang.String accessToken; + + /** + * OAuth access token. + */ + public java.lang.String getAccessToken() { + return accessToken; + } + + /** OAuth access token. */ + public MerchantRequest setAccessToken(java.lang.String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** Data format for response. */ + @com.google.api.client.util.Key + private java.lang.String alt; + + /** + * Data format for response. [default: json] + */ + public java.lang.String getAlt() { + return alt; + } + + /** Data format for response. */ + public MerchantRequest setAlt(java.lang.String alt) { + this.alt = alt; + return this; + } + + /** JSONP */ + @com.google.api.client.util.Key + private java.lang.String callback; + + /** + * JSONP + */ + public java.lang.String getCallback() { + return callback; + } + + /** JSONP */ + public MerchantRequest setCallback(java.lang.String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying which fields to include in a partial response. */ + @com.google.api.client.util.Key + private java.lang.String fields; + + /** + * Selector specifying which fields to include in a partial response. + */ + public java.lang.String getFields() { + return fields; + } + + /** Selector specifying which fields to include in a partial response. */ + public MerchantRequest setFields(java.lang.String fields) { + this.fields = fields; + return this; + } + + /** + * API key. Your API key identifies your project and provides you with API access, quota, and + * reports. Required unless you provide an OAuth 2.0 token. + */ + @com.google.api.client.util.Key + private java.lang.String key; + + /** + * API key. Your API key identifies your project and provides you with API access, quota, and + * reports. Required unless you provide an OAuth 2.0 token. + */ + public java.lang.String getKey() { + return key; + } + + /** + * API key. Your API key identifies your project and provides you with API access, quota, and + * reports. Required unless you provide an OAuth 2.0 token. + */ + public MerchantRequest setKey(java.lang.String key) { + this.key = key; + return this; + } + + /** OAuth 2.0 token for the current user. */ + @com.google.api.client.util.Key("oauth_token") + private java.lang.String oauthToken; + + /** + * OAuth 2.0 token for the current user. + */ + public java.lang.String getOauthToken() { + return oauthToken; + } + + /** OAuth 2.0 token for the current user. */ + public MerchantRequest setOauthToken(java.lang.String oauthToken) { + this.oauthToken = oauthToken; + return this; + } + + /** Returns response with indentations and line breaks. */ + @com.google.api.client.util.Key + private java.lang.Boolean prettyPrint; + + /** + * Returns response with indentations and line breaks. [default: true] + */ + public java.lang.Boolean getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public MerchantRequest setPrettyPrint(java.lang.Boolean prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string + * assigned to a user, but should not exceed 40 characters. + */ + @com.google.api.client.util.Key + private java.lang.String quotaUser; + + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string + * assigned to a user, but should not exceed 40 characters. + */ + public java.lang.String getQuotaUser() { + return quotaUser; + } + + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string + * assigned to a user, but should not exceed 40 characters. + */ + public MerchantRequest setQuotaUser(java.lang.String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + @com.google.api.client.util.Key + private java.lang.String uploadType; + + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + public java.lang.String getUploadType() { + return uploadType; + } + + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + public MerchantRequest setUploadType(java.lang.String uploadType) { + this.uploadType = uploadType; + return this; + } + + /** Upload protocol for media (e.g. "raw", "multipart"). */ + @com.google.api.client.util.Key("upload_protocol") + private java.lang.String uploadProtocol; + + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + public java.lang.String getUploadProtocol() { + return uploadProtocol; + } + + /** Upload protocol for media (e.g. "raw", "multipart"). */ + public MerchantRequest setUploadProtocol(java.lang.String uploadProtocol) { + this.uploadProtocol = uploadProtocol; + return this; + } + + @Override + public final Merchant getAbstractGoogleClient() { + return (Merchant) super.getAbstractGoogleClient(); + } + + @Override + public MerchantRequest setDisableGZipContent(boolean disableGZipContent) { + return (MerchantRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public MerchantRequest setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { + return (MerchantRequest) super.setRequestHeaders(headers); + } + + @Override + public MerchantRequest set(String parameterName, Object value) { + return (MerchantRequest) super.set(parameterName, value); + } +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequestInitializer.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequestInitializer.java new file mode 100644 index 00000000000..57fcd81bc64 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantRequestInitializer.java @@ -0,0 +1,119 @@ +/* + * 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.merchantapi.loyaltycustomers_v1; + +/** + * Merchant request initializer for setting properties like key and userIp. + * + *

+ * The simplest usage is to use it to set the key parameter: + *

+ * + *
+  public static final GoogleClientRequestInitializer KEY_INITIALIZER =
+      new MerchantRequestInitializer(KEY);
+ * 
+ * + *

+ * There is also a constructor to set both the key and userIp parameters: + *

+ * + *
+  public static final GoogleClientRequestInitializer INITIALIZER =
+      new MerchantRequestInitializer(KEY, USER_IP);
+ * 
+ * + *

+ * If you want to implement custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer extends MerchantRequestInitializer {
+
+    {@literal @}Override
+    public void initializeMerchantRequest(MerchantRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer2 extends MerchantRequestInitializer {
+
+    public MyKeyRequestInitializer() {
+      super(KEY, USER_IP);
+    }
+
+    {@literal @}Override
+    public void initializeMerchantRequest(MerchantRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Subclasses should be thread-safe. + *

+ * + * @since 1.12 + */ +public class MerchantRequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { + + public MerchantRequestInitializer() { + super(); + } + + /** + * @param key API key or {@code null} to leave it unchanged + */ + public MerchantRequestInitializer(String key) { + super(key); + } + + /** + * @param key API key or {@code null} to leave it unchanged + * @param userIp user IP or {@code null} to leave it unchanged + */ + public MerchantRequestInitializer(String key, String userIp) { + super(key, userIp); + } + + @Override + public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest request) throws java.io.IOException { + super.initializeJsonRequest(request); + initializeMerchantRequest((MerchantRequest) request); + } + + /** + * Initializes Merchant request. + * + *

+ * Default implementation does nothing. Called from + * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. + *

+ * + * @throws java.io.IOException I/O exception + */ + protected void initializeMerchantRequest(MerchantRequest request) throws java.io.IOException { + } +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantScopes.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantScopes.java new file mode 100644 index 00000000000..9055005aa2e --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/MerchantScopes.java @@ -0,0 +1,42 @@ +/* + * 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.merchantapi.loyaltycustomers_v1; + +/** + * Available OAuth 2.0 scopes for use with the Merchant API. + * + * @since 1.4 + */ +public class MerchantScopes { + + /** Manage your product listings and accounts for Google Shopping. */ + public static final String CONTENT = "https://www.googleapis.com/auth/content"; + + /** + * Returns an unmodifiable set that contains all scopes declared by this class. + * + * @since 1.16 + */ + public static java.util.Set all() { + java.util.Set set = new java.util.HashSet(); + set.add(CONTENT); + return java.util.Collections.unmodifiableSet(set); + } + + private MerchantScopes() { + } +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/AddressInfo.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/AddressInfo.java new file mode 100644 index 00000000000..13e3fdf3eea --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/AddressInfo.java @@ -0,0 +1,195 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * Represents a customer’s physical address. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class AddressInfo extends com.google.api.client.json.GenericJson { + + /** + * Optional. The city of the customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String city; + + /** + * Optional. The family name of the customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String familyName; + + /** + * Optional. The given name of the customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String givenName; + + /** + * Optional. The postal code (zip code) of the customer. **Format Rules:** * **United States:** + * 5-digit zip codes (e.g., "94108"). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String postalCode; + + /** + * Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This + * field is case-insensitive. For more information, see https://cldr.unicode.org/ and + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String regionCode; + + /** + * Optional. The state or province of the customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String state; + + /** + * Optional. The city of the customer. + * @return value or {@code null} for none + */ + public java.lang.String getCity() { + return city; + } + + /** + * Optional. The city of the customer. + * @param city city or {@code null} for none + */ + public AddressInfo setCity(java.lang.String city) { + this.city = city; + return this; + } + + /** + * Optional. The family name of the customer. + * @return value or {@code null} for none + */ + public java.lang.String getFamilyName() { + return familyName; + } + + /** + * Optional. The family name of the customer. + * @param familyName familyName or {@code null} for none + */ + public AddressInfo setFamilyName(java.lang.String familyName) { + this.familyName = familyName; + return this; + } + + /** + * Optional. The given name of the customer. + * @return value or {@code null} for none + */ + public java.lang.String getGivenName() { + return givenName; + } + + /** + * Optional. The given name of the customer. + * @param givenName givenName or {@code null} for none + */ + public AddressInfo setGivenName(java.lang.String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Optional. The postal code (zip code) of the customer. **Format Rules:** * **United States:** + * 5-digit zip codes (e.g., "94108"). + * @return value or {@code null} for none + */ + public java.lang.String getPostalCode() { + return postalCode; + } + + /** + * Optional. The postal code (zip code) of the customer. **Format Rules:** * **United States:** + * 5-digit zip codes (e.g., "94108"). + * @param postalCode postalCode or {@code null} for none + */ + public AddressInfo setPostalCode(java.lang.String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This + * field is case-insensitive. For more information, see https://cldr.unicode.org/ and + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html. + * @return value or {@code null} for none + */ + public java.lang.String getRegionCode() { + return regionCode; + } + + /** + * Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This + * field is case-insensitive. For more information, see https://cldr.unicode.org/ and + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html. + * @param regionCode regionCode or {@code null} for none + */ + public AddressInfo setRegionCode(java.lang.String regionCode) { + this.regionCode = regionCode; + return this; + } + + /** + * Optional. The state or province of the customer. + * @return value or {@code null} for none + */ + public java.lang.String getState() { + return state; + } + + /** + * Optional. The state or province of the customer. + * @param state state or {@code null} for none + */ + public AddressInfo setState(java.lang.String state) { + this.state = state; + return this; + } + + @Override + public AddressInfo set(String fieldName, Object value) { + return (AddressInfo) super.set(fieldName, value); + } + + @Override + public AddressInfo clone() { + return (AddressInfo) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/LoyaltyCustomer.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/LoyaltyCustomer.java new file mode 100644 index 00000000000..27de671e710 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/LoyaltyCustomer.java @@ -0,0 +1,116 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * Represents a customer’s loyalty information. Represents loyalty customer data in + * `ManageLoyaltyCustomerMatch` API, but is not a resource that can be retrieved or listed by other + * methods. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class LoyaltyCustomer extends com.google.api.client.json.GenericJson { + + /** + * Required. The tier label of the loyalty tier the customer belongs to. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String loyaltyTier; + + /** + * Optional. The point balance of the loyalty customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key @com.google.api.client.json.JsonString + private java.lang.Long pointBalance; + + /** + * Required. The identifiers for the customer. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private UserIdentifier userIdentifier; + + /** + * Required. The tier label of the loyalty tier the customer belongs to. + * @return value or {@code null} for none + */ + public java.lang.String getLoyaltyTier() { + return loyaltyTier; + } + + /** + * Required. The tier label of the loyalty tier the customer belongs to. + * @param loyaltyTier loyaltyTier or {@code null} for none + */ + public LoyaltyCustomer setLoyaltyTier(java.lang.String loyaltyTier) { + this.loyaltyTier = loyaltyTier; + return this; + } + + /** + * Optional. The point balance of the loyalty customer. + * @return value or {@code null} for none + */ + public java.lang.Long getPointBalance() { + return pointBalance; + } + + /** + * Optional. The point balance of the loyalty customer. + * @param pointBalance pointBalance or {@code null} for none + */ + public LoyaltyCustomer setPointBalance(java.lang.Long pointBalance) { + this.pointBalance = pointBalance; + return this; + } + + /** + * Required. The identifiers for the customer. + * @return value or {@code null} for none + */ + public UserIdentifier getUserIdentifier() { + return userIdentifier; + } + + /** + * Required. The identifiers for the customer. + * @param userIdentifier userIdentifier or {@code null} for none + */ + public LoyaltyCustomer setUserIdentifier(UserIdentifier userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + @Override + public LoyaltyCustomer set(String fieldName, Object value) { + return (LoyaltyCustomer) super.set(fieldName, value); + } + + @Override + public LoyaltyCustomer clone() { + return (LoyaltyCustomer) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchRequest.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchRequest.java new file mode 100644 index 00000000000..a183a60010a --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchRequest.java @@ -0,0 +1,66 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * Request message for the ManageLoyaltyCustomerMatch method. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ManageLoyaltyCustomerMatchRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The loyalty customer to insert, update, or remove. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private LoyaltyCustomer loyaltyCustomer; + + /** + * Required. The loyalty customer to insert, update, or remove. + * @return value or {@code null} for none + */ + public LoyaltyCustomer getLoyaltyCustomer() { + return loyaltyCustomer; + } + + /** + * Required. The loyalty customer to insert, update, or remove. + * @param loyaltyCustomer loyaltyCustomer or {@code null} for none + */ + public ManageLoyaltyCustomerMatchRequest setLoyaltyCustomer(LoyaltyCustomer loyaltyCustomer) { + this.loyaltyCustomer = loyaltyCustomer; + return this; + } + + @Override + public ManageLoyaltyCustomerMatchRequest set(String fieldName, Object value) { + return (ManageLoyaltyCustomerMatchRequest) super.set(fieldName, value); + } + + @Override + public ManageLoyaltyCustomerMatchRequest clone() { + return (ManageLoyaltyCustomerMatchRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchResponse.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchResponse.java new file mode 100644 index 00000000000..64b06f2e38b --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ManageLoyaltyCustomerMatchResponse.java @@ -0,0 +1,72 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * Response message for the ManageLoyaltyCustomerMatch method. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ManageLoyaltyCustomerMatchResponse extends com.google.api.client.json.GenericJson { + + /** + * The loyalty customer that was inserted, updated, or removed. If the customer's identifier + * cannot be matched to a Google account or if the user has not opted into loyalty + * personalization, this field will contain a default `LoyaltyCustomer` instance. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private LoyaltyCustomer loyaltyCustomer; + + /** + * The loyalty customer that was inserted, updated, or removed. If the customer's identifier + * cannot be matched to a Google account or if the user has not opted into loyalty + * personalization, this field will contain a default `LoyaltyCustomer` instance. + * @return value or {@code null} for none + */ + public LoyaltyCustomer getLoyaltyCustomer() { + return loyaltyCustomer; + } + + /** + * The loyalty customer that was inserted, updated, or removed. If the customer's identifier + * cannot be matched to a Google account or if the user has not opted into loyalty + * personalization, this field will contain a default `LoyaltyCustomer` instance. + * @param loyaltyCustomer loyaltyCustomer or {@code null} for none + */ + public ManageLoyaltyCustomerMatchResponse setLoyaltyCustomer(LoyaltyCustomer loyaltyCustomer) { + this.loyaltyCustomer = loyaltyCustomer; + return this; + } + + @Override + public ManageLoyaltyCustomerMatchResponse set(String fieldName, Object value) { + return (ManageLoyaltyCustomerMatchResponse) super.set(fieldName, value); + } + + @Override + public ManageLoyaltyCustomerMatchResponse clone() { + return (ManageLoyaltyCustomerMatchResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductChange.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductChange.java new file mode 100644 index 00000000000..1099cfffb23 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductChange.java @@ -0,0 +1,154 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * The change that happened to the product including old value, new value, country code as the + * region code and reporting context. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ProductChange extends com.google.api.client.json.GenericJson { + + /** + * The new value of the changed resource or attribute. If empty, it means that the product was + * deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String newValue; + + /** + * The old value of the changed resource or attribute. If empty, it means that the product was + * created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String oldValue; + + /** + * Countries that have the change (if applicable). Represented in the ISO 3166 format. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String regionCode; + + /** + * Reporting contexts that have the change (if applicable). Currently this field supports only + * (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, + * `YOUTUBE_AFFILIATE`) from the enum value + * [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum) + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String reportingContext; + + /** + * The new value of the changed resource or attribute. If empty, it means that the product was + * deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * @return value or {@code null} for none + */ + public java.lang.String getNewValue() { + return newValue; + } + + /** + * The new value of the changed resource or attribute. If empty, it means that the product was + * deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * @param newValue newValue or {@code null} for none + */ + public ProductChange setNewValue(java.lang.String newValue) { + this.newValue = newValue; + return this; + } + + /** + * The old value of the changed resource or attribute. If empty, it means that the product was + * created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * @return value or {@code null} for none + */ + public java.lang.String getOldValue() { + return oldValue; + } + + /** + * The old value of the changed resource or attribute. If empty, it means that the product was + * created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) + * @param oldValue oldValue or {@code null} for none + */ + public ProductChange setOldValue(java.lang.String oldValue) { + this.oldValue = oldValue; + return this; + } + + /** + * Countries that have the change (if applicable). Represented in the ISO 3166 format. + * @return value or {@code null} for none + */ + public java.lang.String getRegionCode() { + return regionCode; + } + + /** + * Countries that have the change (if applicable). Represented in the ISO 3166 format. + * @param regionCode regionCode or {@code null} for none + */ + public ProductChange setRegionCode(java.lang.String regionCode) { + this.regionCode = regionCode; + return this; + } + + /** + * Reporting contexts that have the change (if applicable). Currently this field supports only + * (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, + * `YOUTUBE_AFFILIATE`) from the enum value + * [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum) + * @return value or {@code null} for none + */ + public java.lang.String getReportingContext() { + return reportingContext; + } + + /** + * Reporting contexts that have the change (if applicable). Currently this field supports only + * (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, + * `YOUTUBE_AFFILIATE`) from the enum value + * [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum) + * @param reportingContext reportingContext or {@code null} for none + */ + public ProductChange setReportingContext(java.lang.String reportingContext) { + this.reportingContext = reportingContext; + return this; + } + + @Override + public ProductChange set(String fieldName, Object value) { + return (ProductChange) super.set(fieldName, value); + } + + @Override + public ProductChange clone() { + return (ProductChange) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductStatusChangeMessage.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductStatusChangeMessage.java new file mode 100644 index 00000000000..f3caa770696 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/ProductStatusChangeMessage.java @@ -0,0 +1,273 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * The message that the merchant will receive to notify about product status change event + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ProductStatusChangeMessage extends com.google.api.client.json.GenericJson { + + /** + * The target account that owns the entity that changed. Format : `accounts/{merchant_id}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String account; + + /** + * The attribute in the resource that changed, in this case it will be always `Status`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String attribute; + + /** + * A message to describe the change that happened to the product + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List changes; + + static { + // hack to force ProGuard to consider ProductChange used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(ProductChange.class); + } + + /** + * The time at which the event was generated. If you want to order the notification messages you + * receive you should rely on this field not on the order of receiving the notifications. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String eventTime; + + /** + * Optional. The product expiration time. This field will not be set if the notification is sent + * for a product deletion event. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String expirationTime; + + /** + * The account that manages the merchant's account. can be the same as merchant id if it is + * standalone account. Format : `accounts/{service_provider_id}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String managingAccount; + + /** + * The product name. Format: `accounts/{account}/products/{product}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String resource; + + /** + * The product id. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String resourceId; + + /** + * The resource that changed, in this case it will always be `Product`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String resourceType; + + /** + * The target account that owns the entity that changed. Format : `accounts/{merchant_id}` + * @return value or {@code null} for none + */ + public java.lang.String getAccount() { + return account; + } + + /** + * The target account that owns the entity that changed. Format : `accounts/{merchant_id}` + * @param account account or {@code null} for none + */ + public ProductStatusChangeMessage setAccount(java.lang.String account) { + this.account = account; + return this; + } + + /** + * The attribute in the resource that changed, in this case it will be always `Status`. + * @return value or {@code null} for none + */ + public java.lang.String getAttribute() { + return attribute; + } + + /** + * The attribute in the resource that changed, in this case it will be always `Status`. + * @param attribute attribute or {@code null} for none + */ + public ProductStatusChangeMessage setAttribute(java.lang.String attribute) { + this.attribute = attribute; + return this; + } + + /** + * A message to describe the change that happened to the product + * @return value or {@code null} for none + */ + public java.util.List getChanges() { + return changes; + } + + /** + * A message to describe the change that happened to the product + * @param changes changes or {@code null} for none + */ + public ProductStatusChangeMessage setChanges(java.util.List changes) { + this.changes = changes; + return this; + } + + /** + * The time at which the event was generated. If you want to order the notification messages you + * receive you should rely on this field not on the order of receiving the notifications. + * @return value or {@code null} for none + */ + public String getEventTime() { + return eventTime; + } + + /** + * The time at which the event was generated. If you want to order the notification messages you + * receive you should rely on this field not on the order of receiving the notifications. + * @param eventTime eventTime or {@code null} for none + */ + public ProductStatusChangeMessage setEventTime(String eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Optional. The product expiration time. This field will not be set if the notification is sent + * for a product deletion event. + * @return value or {@code null} for none + */ + public String getExpirationTime() { + return expirationTime; + } + + /** + * Optional. The product expiration time. This field will not be set if the notification is sent + * for a product deletion event. + * @param expirationTime expirationTime or {@code null} for none + */ + public ProductStatusChangeMessage setExpirationTime(String expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * The account that manages the merchant's account. can be the same as merchant id if it is + * standalone account. Format : `accounts/{service_provider_id}` + * @return value or {@code null} for none + */ + public java.lang.String getManagingAccount() { + return managingAccount; + } + + /** + * The account that manages the merchant's account. can be the same as merchant id if it is + * standalone account. Format : `accounts/{service_provider_id}` + * @param managingAccount managingAccount or {@code null} for none + */ + public ProductStatusChangeMessage setManagingAccount(java.lang.String managingAccount) { + this.managingAccount = managingAccount; + return this; + } + + /** + * The product name. Format: `accounts/{account}/products/{product}` + * @return value or {@code null} for none + */ + public java.lang.String getResource() { + return resource; + } + + /** + * The product name. Format: `accounts/{account}/products/{product}` + * @param resource resource or {@code null} for none + */ + public ProductStatusChangeMessage setResource(java.lang.String resource) { + this.resource = resource; + return this; + } + + /** + * The product id. + * @return value or {@code null} for none + */ + public java.lang.String getResourceId() { + return resourceId; + } + + /** + * The product id. + * @param resourceId resourceId or {@code null} for none + */ + public ProductStatusChangeMessage setResourceId(java.lang.String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The resource that changed, in this case it will always be `Product`. + * @return value or {@code null} for none + */ + public java.lang.String getResourceType() { + return resourceType; + } + + /** + * The resource that changed, in this case it will always be `Product`. + * @param resourceType resourceType or {@code null} for none + */ + public ProductStatusChangeMessage setResourceType(java.lang.String resourceType) { + this.resourceType = resourceType; + return this; + } + + @Override + public ProductStatusChangeMessage set(String fieldName, Object value) { + return (ProductStatusChangeMessage) super.set(fieldName, value); + } + + @Override + public ProductStatusChangeMessage clone() { + return (ProductStatusChangeMessage) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/UserIdentifier.java b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/UserIdentifier.java new file mode 100644 index 00000000000..02b00c21d76 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/com/google/api/services/merchantapi/loyaltycustomers_v1/model/UserIdentifier.java @@ -0,0 +1,118 @@ +/* + * 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.merchantapi.loyaltycustomers_v1.model; + +/** + * The user identifiers associated with the customer. At least one of the fields within this message + * must be provided. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Merchant API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class UserIdentifier extends com.google.api.client.json.GenericJson { + + /** + * Optional. The customer’s physical address. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private AddressInfo address; + + /** + * Optional. The customer’s email address. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String emailAddress; + + /** + * Optional. The customer's phone number, in [E.164 format](https://support.google.com/google- + * ads/answer/16355235) (e.g., "+16502530000"). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String phoneNumber; + + /** + * Optional. The customer’s physical address. + * @return value or {@code null} for none + */ + public AddressInfo getAddress() { + return address; + } + + /** + * Optional. The customer’s physical address. + * @param address address or {@code null} for none + */ + public UserIdentifier setAddress(AddressInfo address) { + this.address = address; + return this; + } + + /** + * Optional. The customer’s email address. + * @return value or {@code null} for none + */ + public java.lang.String getEmailAddress() { + return emailAddress; + } + + /** + * Optional. The customer’s email address. + * @param emailAddress emailAddress or {@code null} for none + */ + public UserIdentifier setEmailAddress(java.lang.String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Optional. The customer's phone number, in [E.164 format](https://support.google.com/google- + * ads/answer/16355235) (e.g., "+16502530000"). + * @return value or {@code null} for none + */ + public java.lang.String getPhoneNumber() { + return phoneNumber; + } + + /** + * Optional. The customer's phone number, in [E.164 format](https://support.google.com/google- + * ads/answer/16355235) (e.g., "+16502530000"). + * @param phoneNumber phoneNumber or {@code null} for none + */ + public UserIdentifier setPhoneNumber(java.lang.String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + @Override + public UserIdentifier set(String fieldName, Object value) { + return (UserIdentifier) super.set(fieldName, value); + } + + @Override + public UserIdentifier clone() { + return (UserIdentifier) super.clone(); + } + +} diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/pom.xml b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/pom.xml new file mode 100644 index 00000000000..5cd767413b7 --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/2.0.0/pom.xml @@ -0,0 +1,219 @@ + + 4.0.0 + + org.sonatype.oss + oss-parent + 7 + + + com.google.apis + google-api-services-merchantapi + loyaltycustomers_v1-rev20260805-2.0.0 + Merchant API loyaltycustomers_v1-rev20260805-2.0.0 + jar + + 2011 + + + + GoogleAPIs + GoogleAPIs + googleapis@googlegroups.com + Google + https://www.google.com + + + + + Google + http://www.google.com/ + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + ossrh + https://google.oss.sonatype.org/content/repositories/snapshots + + + + + + + maven-compiler-plugin + 3.9.0 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + com.google.api.services.merchantapi + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.0 + + + attach-javadocs + + jar + + + + + none + Merchant API ${project.version} + Merchant API ${project.version} + + http://docs.oracle.com/javase/7/docs/api + https://googleapis.dev/java/google-http-client/${httpClientLibrary}/ + https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/ + https://googleapis.dev/java/google-api-client/2.7.2/ + + + + + org.codehaus.mojo + clirr-maven-plugin + 2.8 + + clirr-ignored-differences.xml + true + + + + + check + + + + + + . + + + ./resources + + + + + + + com.google.api-client + google-api-client + 2.7.2 + + + + + UTF-8 + + + + + + release-sonatype + + + + !artifact-registry-url + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + sonatype-nexus-staging + https://google.oss.sonatype.org/ + false + + + + + + + + release-gcp-artifact-registry + + artifactregistry://please-define-artifact-registry-url-property + + + + gcp-artifact-registry-repository + ${artifact-registry-url} + + + gcp-artifact-registry-repository + ${artifact-registry-url} + + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + + \ No newline at end of file diff --git a/clients/google-api-services-merchantapi/loyaltycustomers_v1/README.md b/clients/google-api-services-merchantapi/loyaltycustomers_v1/README.md new file mode 100644 index 00000000000..d0b444e43fd --- /dev/null +++ b/clients/google-api-services-merchantapi/loyaltycustomers_v1/README.md @@ -0,0 +1,44 @@ +# Merchant API Client Library for Java + +Programmatically manage your Merchant Center Accounts. + +This page contains information about getting started with the Merchant API +using the Google API Client Library for Java. In addition, you may be interested +in the following documentation: + +* Browse the [Javadoc reference for the Merchant API][javadoc] +* Read the [Developer's Guide for the Google API Client Library for Java][google-api-client]. +* Interact with this API in your browser using the [APIs Explorer for the Merchant API][api-explorer] + +## Installation + +### Maven + +Add the following lines to your `pom.xml` file: + +```xml + + + + com.google.apis + google-api-services-merchantapi + loyaltycustomers_v1-rev20260805-2.0.0 + + + +``` + +### Gradle + +```gradle +repositories { + mavenCentral() +} +dependencies { + implementation 'com.google.apis:google-api-services-merchantapi:loyaltycustomers_v1-rev20260805-2.0.0' +} +``` + +[javadoc]: https://googleapis.dev/java/google-api-services-merchantapi/latest/index.html +[google-api-client]: https://github.com/googleapis/google-api-java-client/ +[api-explorer]: https://developers.google.com/apis-explorer/#p/merchantapi/v1/