/*
 * 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.mybusinessverifications.v1;

/**
 * Service definition for MyBusinessVerifications (v1).
 *
 * <p>
 * The My Business Verifications API provides an interface for taking verifications related actions for locations.
 * </p>
 *
 * <p>
 * For more information about this service, see the
 * <a href="https://developers.google.com/my-business/" target="_blank">API Documentation</a>
 * </p>
 *
 * <p>
 * This service uses {@link MyBusinessVerificationsRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 * </p>
 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class MyBusinessVerifications 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 My Business Verifications 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://mybusinessverifications.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://mybusinessverifications.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.
   *
   * <p>
   * Use {@link Builder} if you need to specify any of the optional parameters.
   * </p>
   *
   * @param transport HTTP transport, which should normally be:
   *        <ul>
   *        <li>Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
   *        <li>Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
   *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *        </li>
   *        </ul>
   * @param jsonFactory JSON factory, which may be:
   *        <ul>
   *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
   *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
   *        <li>Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
   *        </ul>
   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public MyBusinessVerifications(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
   */
  MyBusinessVerifications(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 Locations collection.
   *
   * <p>The typical use is:</p>
   * <pre>
   *   {@code MyBusinessVerifications mybusinessverifications = new MyBusinessVerifications(...);}
   *   {@code MyBusinessVerifications.Locations.List request = mybusinessverifications.locations().list(parameters ...)}
   * </pre>
   *
   * @return the resource collection
   */
  public Locations locations() {
    return new Locations();
  }

  /**
   * The "locations" collection of methods.
   */
  public class Locations {

    /**
     * Reports all eligible verification options for a location in a specific language.
     *
     * Create a request for the method "locations.fetchVerificationOptions".
     *
     * This request holds the parameters needed by the mybusinessverifications server.  After setting
     * any optional parameters, call the {@link FetchVerificationOptions#execute()} method to invoke the
     * remote operation.
     *
     * @param location Required. The location to verify.
     * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsRequest}
     * @return the request
     */
    public FetchVerificationOptions fetchVerificationOptions(java.lang.String location, com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsRequest content) throws java.io.IOException {
      FetchVerificationOptions result = new FetchVerificationOptions(location, content);
      initialize(result);
      return result;
    }

    public class FetchVerificationOptions extends MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsResponse> {

      private static final String REST_PATH = "v1/{+location}:fetchVerificationOptions";

      private final java.util.regex.Pattern LOCATION_PATTERN =
          java.util.regex.Pattern.compile("^locations/[^/]+$");

      /**
       * Reports all eligible verification options for a location in a specific language.
       *
       * Create a request for the method "locations.fetchVerificationOptions".
       *
       * This request holds the parameters needed by the the mybusinessverifications server.  After
       * setting any optional parameters, call the {@link FetchVerificationOptions#execute()} method to
       * invoke the remote operation. <p> {@link FetchVerificationOptions#initialize(com.google.api.clie
       * nt.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance
       * immediately after invoking the constructor. </p>
       *
       * @param location Required. The location to verify.
       * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsRequest}
       * @since 1.13
       */
      protected FetchVerificationOptions(java.lang.String location, com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsRequest content) {
        super(MyBusinessVerifications.this, "POST", REST_PATH, content, com.google.api.services.mybusinessverifications.v1.model.FetchVerificationOptionsResponse.class);
        this.location = com.google.api.client.util.Preconditions.checkNotNull(location, "Required parameter location must be specified.");
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(LOCATION_PATTERN.matcher(location).matches(),
              "Parameter location must conform to the pattern " +
              "^locations/[^/]+$");
        }
      }

      @Override
      public FetchVerificationOptions set$Xgafv(java.lang.String $Xgafv) {
        return (FetchVerificationOptions) super.set$Xgafv($Xgafv);
      }

      @Override
      public FetchVerificationOptions setAccessToken(java.lang.String accessToken) {
        return (FetchVerificationOptions) super.setAccessToken(accessToken);
      }

      @Override
      public FetchVerificationOptions setAlt(java.lang.String alt) {
        return (FetchVerificationOptions) super.setAlt(alt);
      }

      @Override
      public FetchVerificationOptions setCallback(java.lang.String callback) {
        return (FetchVerificationOptions) super.setCallback(callback);
      }

      @Override
      public FetchVerificationOptions setFields(java.lang.String fields) {
        return (FetchVerificationOptions) super.setFields(fields);
      }

      @Override
      public FetchVerificationOptions setKey(java.lang.String key) {
        return (FetchVerificationOptions) super.setKey(key);
      }

      @Override
      public FetchVerificationOptions setOauthToken(java.lang.String oauthToken) {
        return (FetchVerificationOptions) super.setOauthToken(oauthToken);
      }

      @Override
      public FetchVerificationOptions setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (FetchVerificationOptions) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public FetchVerificationOptions setQuotaUser(java.lang.String quotaUser) {
        return (FetchVerificationOptions) super.setQuotaUser(quotaUser);
      }

      @Override
      public FetchVerificationOptions setUploadType(java.lang.String uploadType) {
        return (FetchVerificationOptions) super.setUploadType(uploadType);
      }

      @Override
      public FetchVerificationOptions setUploadProtocol(java.lang.String uploadProtocol) {
        return (FetchVerificationOptions) super.setUploadProtocol(uploadProtocol);
      }

      /** Required. The location to verify. */
      @com.google.api.client.util.Key
      private java.lang.String location;

      /** Required. The location to verify.
       */
      public java.lang.String getLocation() {
        return location;
      }

      /** Required. The location to verify. */
      public FetchVerificationOptions setLocation(java.lang.String location) {
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(LOCATION_PATTERN.matcher(location).matches(),
              "Parameter location must conform to the pattern " +
              "^locations/[^/]+$");
        }
        this.location = location;
        return this;
      }

      @Override
      public FetchVerificationOptions set(String parameterName, Object value) {
        return (FetchVerificationOptions) super.set(parameterName, value);
      }
    }
    /**
     * Gets the VoiceOfMerchant state.
     *
     * Create a request for the method "locations.getVoiceOfMerchantState".
     *
     * This request holds the parameters needed by the mybusinessverifications server.  After setting
     * any optional parameters, call the {@link GetVoiceOfMerchantState#execute()} method to invoke the
     * remote operation.
     *
     * @param name Required. Resource name of the location.
     * @return the request
     */
    public GetVoiceOfMerchantState getVoiceOfMerchantState(java.lang.String name) throws java.io.IOException {
      GetVoiceOfMerchantState result = new GetVoiceOfMerchantState(name);
      initialize(result);
      return result;
    }

    public class GetVoiceOfMerchantState extends MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.VoiceOfMerchantState> {

      private static final String REST_PATH = "v1/{+name}/VoiceOfMerchantState";

      private final java.util.regex.Pattern NAME_PATTERN =
          java.util.regex.Pattern.compile("^locations/[^/]+$");

      /**
       * Gets the VoiceOfMerchant state.
       *
       * Create a request for the method "locations.getVoiceOfMerchantState".
       *
       * This request holds the parameters needed by the the mybusinessverifications server.  After
       * setting any optional parameters, call the {@link GetVoiceOfMerchantState#execute()} method to
       * invoke the remote operation. <p> {@link GetVoiceOfMerchantState#initialize(com.google.api.clien
       * t.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance
       * immediately after invoking the constructor. </p>
       *
       * @param name Required. Resource name of the location.
       * @since 1.13
       */
      protected GetVoiceOfMerchantState(java.lang.String name) {
        super(MyBusinessVerifications.this, "GET", REST_PATH, null, com.google.api.services.mybusinessverifications.v1.model.VoiceOfMerchantState.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 " +
              "^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 GetVoiceOfMerchantState set$Xgafv(java.lang.String $Xgafv) {
        return (GetVoiceOfMerchantState) super.set$Xgafv($Xgafv);
      }

      @Override
      public GetVoiceOfMerchantState setAccessToken(java.lang.String accessToken) {
        return (GetVoiceOfMerchantState) super.setAccessToken(accessToken);
      }

      @Override
      public GetVoiceOfMerchantState setAlt(java.lang.String alt) {
        return (GetVoiceOfMerchantState) super.setAlt(alt);
      }

      @Override
      public GetVoiceOfMerchantState setCallback(java.lang.String callback) {
        return (GetVoiceOfMerchantState) super.setCallback(callback);
      }

      @Override
      public GetVoiceOfMerchantState setFields(java.lang.String fields) {
        return (GetVoiceOfMerchantState) super.setFields(fields);
      }

      @Override
      public GetVoiceOfMerchantState setKey(java.lang.String key) {
        return (GetVoiceOfMerchantState) super.setKey(key);
      }

      @Override
      public GetVoiceOfMerchantState setOauthToken(java.lang.String oauthToken) {
        return (GetVoiceOfMerchantState) super.setOauthToken(oauthToken);
      }

      @Override
      public GetVoiceOfMerchantState setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (GetVoiceOfMerchantState) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public GetVoiceOfMerchantState setQuotaUser(java.lang.String quotaUser) {
        return (GetVoiceOfMerchantState) super.setQuotaUser(quotaUser);
      }

      @Override
      public GetVoiceOfMerchantState setUploadType(java.lang.String uploadType) {
        return (GetVoiceOfMerchantState) super.setUploadType(uploadType);
      }

      @Override
      public GetVoiceOfMerchantState setUploadProtocol(java.lang.String uploadProtocol) {
        return (GetVoiceOfMerchantState) super.setUploadProtocol(uploadProtocol);
      }

      /** Required. Resource name of the location. */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** Required. Resource name of the location.
       */
      public java.lang.String getName() {
        return name;
      }

      /** Required. Resource name of the location. */
      public GetVoiceOfMerchantState 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 " +
              "^locations/[^/]+$");
        }
        this.name = name;
        return this;
      }

      @Override
      public GetVoiceOfMerchantState set(String parameterName, Object value) {
        return (GetVoiceOfMerchantState) super.set(parameterName, value);
      }
    }
    /**
     * Starts the verification process for a location.
     *
     * Create a request for the method "locations.verify".
     *
     * This request holds the parameters needed by the mybusinessverifications server.  After setting
     * any optional parameters, call the {@link Verify#execute()} method to invoke the remote operation.
     *
     * @param name Required. Resource name of the location to verify.
     * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.VerifyLocationRequest}
     * @return the request
     */
    public Verify verify(java.lang.String name, com.google.api.services.mybusinessverifications.v1.model.VerifyLocationRequest content) throws java.io.IOException {
      Verify result = new Verify(name, content);
      initialize(result);
      return result;
    }

    public class Verify extends MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.VerifyLocationResponse> {

      private static final String REST_PATH = "v1/{+name}:verify";

      private final java.util.regex.Pattern NAME_PATTERN =
          java.util.regex.Pattern.compile("^locations/[^/]+$");

      /**
       * Starts the verification process for a location.
       *
       * Create a request for the method "locations.verify".
       *
       * This request holds the parameters needed by the the mybusinessverifications server.  After
       * setting any optional parameters, call the {@link Verify#execute()} method to invoke the remote
       * operation. <p> {@link
       * Verify#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor. </p>
       *
       * @param name Required. Resource name of the location to verify.
       * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.VerifyLocationRequest}
       * @since 1.13
       */
      protected Verify(java.lang.String name, com.google.api.services.mybusinessverifications.v1.model.VerifyLocationRequest content) {
        super(MyBusinessVerifications.this, "POST", REST_PATH, content, com.google.api.services.mybusinessverifications.v1.model.VerifyLocationResponse.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 " +
              "^locations/[^/]+$");
        }
      }

      @Override
      public Verify set$Xgafv(java.lang.String $Xgafv) {
        return (Verify) super.set$Xgafv($Xgafv);
      }

      @Override
      public Verify setAccessToken(java.lang.String accessToken) {
        return (Verify) super.setAccessToken(accessToken);
      }

      @Override
      public Verify setAlt(java.lang.String alt) {
        return (Verify) super.setAlt(alt);
      }

      @Override
      public Verify setCallback(java.lang.String callback) {
        return (Verify) super.setCallback(callback);
      }

      @Override
      public Verify setFields(java.lang.String fields) {
        return (Verify) super.setFields(fields);
      }

      @Override
      public Verify setKey(java.lang.String key) {
        return (Verify) super.setKey(key);
      }

      @Override
      public Verify setOauthToken(java.lang.String oauthToken) {
        return (Verify) super.setOauthToken(oauthToken);
      }

      @Override
      public Verify setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Verify) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Verify setQuotaUser(java.lang.String quotaUser) {
        return (Verify) super.setQuotaUser(quotaUser);
      }

      @Override
      public Verify setUploadType(java.lang.String uploadType) {
        return (Verify) super.setUploadType(uploadType);
      }

      @Override
      public Verify setUploadProtocol(java.lang.String uploadProtocol) {
        return (Verify) super.setUploadProtocol(uploadProtocol);
      }

      /** Required. Resource name of the location to verify. */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** Required. Resource name of the location to verify.
       */
      public java.lang.String getName() {
        return name;
      }

      /** Required. Resource name of the location to verify. */
      public Verify 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 " +
              "^locations/[^/]+$");
        }
        this.name = name;
        return this;
      }

      @Override
      public Verify set(String parameterName, Object value) {
        return (Verify) super.set(parameterName, value);
      }
    }

    /**
     * An accessor for creating requests from the Verifications collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code MyBusinessVerifications mybusinessverifications = new MyBusinessVerifications(...);}
     *   {@code MyBusinessVerifications.Verifications.List request = mybusinessverifications.verifications().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public Verifications verifications() {
      return new Verifications();
    }

    /**
     * The "verifications" collection of methods.
     */
    public class Verifications {

      /**
       * Completes a `PENDING` verification. It is only necessary for non `AUTO` verification methods.
       * `AUTO` verification request is instantly `VERIFIED` upon creation.
       *
       * Create a request for the method "verifications.complete".
       *
       * This request holds the parameters needed by the mybusinessverifications server.  After setting
       * any optional parameters, call the {@link Complete#execute()} method to invoke the remote
       * operation.
       *
       * @param name Required. Resource name of the verification to complete.
       * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationRequest}
       * @return the request
       */
      public Complete complete(java.lang.String name, com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationRequest content) throws java.io.IOException {
        Complete result = new Complete(name, content);
        initialize(result);
        return result;
      }

      public class Complete extends MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationResponse> {

        private static final String REST_PATH = "v1/{+name}:complete";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^locations/[^/]+/verifications/[^/]+$");

        /**
         * Completes a `PENDING` verification. It is only necessary for non `AUTO` verification methods.
         * `AUTO` verification request is instantly `VERIFIED` upon creation.
         *
         * Create a request for the method "verifications.complete".
         *
         * This request holds the parameters needed by the the mybusinessverifications server.  After
         * setting any optional parameters, call the {@link Complete#execute()} method to invoke the
         * remote operation. <p> {@link
         * Complete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. Resource name of the verification to complete.
         * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationRequest}
         * @since 1.13
         */
        protected Complete(java.lang.String name, com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationRequest content) {
          super(MyBusinessVerifications.this, "POST", REST_PATH, content, com.google.api.services.mybusinessverifications.v1.model.CompleteVerificationResponse.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 " +
                "^locations/[^/]+/verifications/[^/]+$");
          }
        }

        @Override
        public Complete set$Xgafv(java.lang.String $Xgafv) {
          return (Complete) super.set$Xgafv($Xgafv);
        }

        @Override
        public Complete setAccessToken(java.lang.String accessToken) {
          return (Complete) super.setAccessToken(accessToken);
        }

        @Override
        public Complete setAlt(java.lang.String alt) {
          return (Complete) super.setAlt(alt);
        }

        @Override
        public Complete setCallback(java.lang.String callback) {
          return (Complete) super.setCallback(callback);
        }

        @Override
        public Complete setFields(java.lang.String fields) {
          return (Complete) super.setFields(fields);
        }

        @Override
        public Complete setKey(java.lang.String key) {
          return (Complete) super.setKey(key);
        }

        @Override
        public Complete setOauthToken(java.lang.String oauthToken) {
          return (Complete) super.setOauthToken(oauthToken);
        }

        @Override
        public Complete setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Complete) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Complete setQuotaUser(java.lang.String quotaUser) {
          return (Complete) super.setQuotaUser(quotaUser);
        }

        @Override
        public Complete setUploadType(java.lang.String uploadType) {
          return (Complete) super.setUploadType(uploadType);
        }

        @Override
        public Complete setUploadProtocol(java.lang.String uploadProtocol) {
          return (Complete) super.setUploadProtocol(uploadProtocol);
        }

        /** Required. Resource name of the verification to complete. */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. Resource name of the verification to complete.
         */
        public java.lang.String getName() {
          return name;
        }

        /** Required. Resource name of the verification to complete. */
        public Complete 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 " +
                "^locations/[^/]+/verifications/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Complete set(String parameterName, Object value) {
          return (Complete) super.set(parameterName, value);
        }
      }
      /**
       * List verifications of a location, ordered by create time.
       *
       * Create a request for the method "verifications.list".
       *
       * This request holds the parameters needed by the mybusinessverifications server.  After setting
       * any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. Resource name of the location that verification requests belong to.
       * @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 MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.ListVerificationsResponse> {

        private static final String REST_PATH = "v1/{+parent}/verifications";

        private final java.util.regex.Pattern PARENT_PATTERN =
            java.util.regex.Pattern.compile("^locations/[^/]+$");

        /**
         * List verifications of a location, ordered by create time.
         *
         * Create a request for the method "verifications.list".
         *
         * This request holds the parameters needed by the the mybusinessverifications server.  After
         * setting any optional parameters, call the {@link List#execute()} method to invoke the remote
         * operation. <p> {@link
         * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
         * called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. Resource name of the location that verification requests belong to.
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(MyBusinessVerifications.this, "GET", REST_PATH, null, com.google.api.services.mybusinessverifications.v1.model.ListVerificationsResponse.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 " +
                "^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. Resource name of the location that verification requests belong to. */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. Resource name of the location that verification requests belong to.
         */
        public java.lang.String getParent() {
          return parent;
        }

        /** Required. Resource name of the location that verification requests belong to. */
        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 " +
                "^locations/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /**
         * How many verification to include per page. Minimum is 1, and the default and maximum page
         * size is 100.
         */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** How many verification to include per page. Minimum is 1, and the default and maximum page size is
       100.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /**
         * How many verification to include per page. Minimum is 1, and the default and maximum page
         * size is 100.
         */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /** If specified, returns the next page of verifications. */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** If specified, returns the next page of verifications.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /** If specified, returns the next page of verifications. */
        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 VerificationTokens collection.
   *
   * <p>The typical use is:</p>
   * <pre>
   *   {@code MyBusinessVerifications mybusinessverifications = new MyBusinessVerifications(...);}
   *   {@code MyBusinessVerifications.VerificationTokens.List request = mybusinessverifications.verificationTokens().list(parameters ...)}
   * </pre>
   *
   * @return the resource collection
   */
  public VerificationTokens verificationTokens() {
    return new VerificationTokens();
  }

  /**
   * The "verificationTokens" collection of methods.
   */
  public class VerificationTokens {

    /**
     * Generates a token for the provided location data as a vetted
     * [partner](https://support.google.com/business/answer/7674102). Throws PERMISSION_DENIED if the
     * caller is not a vetted partner account. Throws FAILED_PRECONDITION if the caller's VettedStatus
     * is INVALID.
     *
     * Create a request for the method "verificationTokens.generate".
     *
     * This request holds the parameters needed by the mybusinessverifications server.  After setting
     * any optional parameters, call the {@link Generate#execute()} method to invoke the remote
     * operation.
     *
     * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenRequest}
     * @return the request
     */
    public Generate generate(com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenRequest content) throws java.io.IOException {
      Generate result = new Generate(content);
      initialize(result);
      return result;
    }

    public class Generate extends MyBusinessVerificationsRequest<com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenResponse> {

      private static final String REST_PATH = "v1/verificationTokens:generate";

      /**
       * Generates a token for the provided location data as a vetted
       * [partner](https://support.google.com/business/answer/7674102). Throws PERMISSION_DENIED if the
       * caller is not a vetted partner account. Throws FAILED_PRECONDITION if the caller's VettedStatus
       * is INVALID.
       *
       * Create a request for the method "verificationTokens.generate".
       *
       * This request holds the parameters needed by the the mybusinessverifications server.  After
       * setting any optional parameters, call the {@link Generate#execute()} method to invoke the
       * remote operation. <p> {@link
       * Generate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor. </p>
       *
       * @param content the {@link com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenRequest}
       * @since 1.13
       */
      protected Generate(com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenRequest content) {
        super(MyBusinessVerifications.this, "POST", REST_PATH, content, com.google.api.services.mybusinessverifications.v1.model.GenerateVerificationTokenResponse.class);
      }

      @Override
      public Generate set$Xgafv(java.lang.String $Xgafv) {
        return (Generate) super.set$Xgafv($Xgafv);
      }

      @Override
      public Generate setAccessToken(java.lang.String accessToken) {
        return (Generate) super.setAccessToken(accessToken);
      }

      @Override
      public Generate setAlt(java.lang.String alt) {
        return (Generate) super.setAlt(alt);
      }

      @Override
      public Generate setCallback(java.lang.String callback) {
        return (Generate) super.setCallback(callback);
      }

      @Override
      public Generate setFields(java.lang.String fields) {
        return (Generate) super.setFields(fields);
      }

      @Override
      public Generate setKey(java.lang.String key) {
        return (Generate) super.setKey(key);
      }

      @Override
      public Generate setOauthToken(java.lang.String oauthToken) {
        return (Generate) super.setOauthToken(oauthToken);
      }

      @Override
      public Generate setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Generate) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Generate setQuotaUser(java.lang.String quotaUser) {
        return (Generate) super.setQuotaUser(quotaUser);
      }

      @Override
      public Generate setUploadType(java.lang.String uploadType) {
        return (Generate) super.setUploadType(uploadType);
      }

      @Override
      public Generate setUploadProtocol(java.lang.String uploadProtocol) {
        return (Generate) super.setUploadProtocol(uploadProtocol);
      }

      @Override
      public Generate set(String parameterName, Object value) {
        return (Generate) super.set(parameterName, value);
      }
    }

  }

  /**
   * Builder for {@link MyBusinessVerifications}.
   *
   * <p>
   * Implementation is not thread-safe.
   * </p>
   *
   * @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:
     *        <ul>
     *        <li>Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
     *        <li>Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
     *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *        </li>
     *        </ul>
     * @param jsonFactory JSON factory, which may be:
     *        <ul>
     *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
     *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
     *        <li>Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
     *        </ul>
     * @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 MyBusinessVerifications}. */
    @Override
    public MyBusinessVerifications build() {
      return new MyBusinessVerifications(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 MyBusinessVerificationsRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setMyBusinessVerificationsRequestInitializer(
        MyBusinessVerificationsRequestInitializer mybusinessverificationsRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(mybusinessverificationsRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}
