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

/**
 * Service definition for MyBusinessBusinessCalls (v1).
 *
 * <p>
 * The My Business Business Calls API manages business calls information of a location on Google.
 * </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 MyBusinessBusinessCallsRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 * </p>
 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class MyBusinessBusinessCalls 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 Business Calls 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://mybusinessbusinesscalls.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://mybusinessbusinesscalls.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 MyBusinessBusinessCalls(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
   */
  MyBusinessBusinessCalls(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 MyBusinessBusinessCalls mybusinessbusinesscalls = new MyBusinessBusinessCalls(...);}
   *   {@code MyBusinessBusinessCalls.Locations.List request = mybusinessbusinesscalls.locations().list(parameters ...)}
   * </pre>
   *
   * @return the resource collection
   */
  public Locations locations() {
    return new Locations();
  }

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

    /**
     * Returns the Business calls settings resource for the given location.
     *
     * Create a request for the method "locations.getBusinesscallssettings".
     *
     * This request holds the parameters needed by the mybusinessbusinesscalls server.  After setting
     * any optional parameters, call the {@link GetBusinesscallssettings#execute()} method to invoke the
     * remote operation.
     *
     * @param name Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call
     *        settings to get. Format: locations/{location_id}/businesscallssettings.
     * @return the request
     */
    public GetBusinesscallssettings getBusinesscallssettings(java.lang.String name) throws java.io.IOException {
      GetBusinesscallssettings result = new GetBusinesscallssettings(name);
      initialize(result);
      return result;
    }

    public class GetBusinesscallssettings extends MyBusinessBusinessCallsRequest<com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings> {

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

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

      /**
       * Returns the Business calls settings resource for the given location.
       *
       * Create a request for the method "locations.getBusinesscallssettings".
       *
       * This request holds the parameters needed by the the mybusinessbusinesscalls server.  After
       * setting any optional parameters, call the {@link GetBusinesscallssettings#execute()} method to
       * invoke the remote operation. <p> {@link GetBusinesscallssettings#initialize(com.google.api.clie
       * nt.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance
       * immediately after invoking the constructor. </p>
       *
       * @param name Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call
     *        settings to get. Format: locations/{location_id}/businesscallssettings.
       * @since 1.13
       */
      protected GetBusinesscallssettings(java.lang.String name) {
        super(MyBusinessBusinessCalls.this, "GET", REST_PATH, null, com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings.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/[^/]+/businesscallssettings$");
        }
      }

      @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 GetBusinesscallssettings set$Xgafv(java.lang.String $Xgafv) {
        return (GetBusinesscallssettings) super.set$Xgafv($Xgafv);
      }

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

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

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

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

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

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

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

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

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

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

      /**
       * Required. The BusinessCallsSettings to get. The `name` field is used to identify the
       * business call settings to get. Format: locations/{location_id}/businesscallssettings.
       */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call
     settings to get. Format: locations/{location_id}/businesscallssettings.
       */
      public java.lang.String getName() {
        return name;
      }

      /**
       * Required. The BusinessCallsSettings to get. The `name` field is used to identify the
       * business call settings to get. Format: locations/{location_id}/businesscallssettings.
       */
      public GetBusinesscallssettings 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/[^/]+/businesscallssettings$");
        }
        this.name = name;
        return this;
      }

      @Override
      public GetBusinesscallssettings set(String parameterName, Object value) {
        return (GetBusinesscallssettings) super.set(parameterName, value);
      }
    }
    /**
     * Updates the Business call settings for the specified location.
     *
     * Create a request for the method "locations.updateBusinesscallssettings".
     *
     * This request holds the parameters needed by the mybusinessbusinesscalls server.  After setting
     * any optional parameters, call the {@link UpdateBusinesscallssettings#execute()} method to invoke
     * the remote operation.
     *
     * @param name Required. The resource name of the calls settings. Format:
     *        locations/{location}/businesscallssettings
     * @param content the {@link com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings}
     * @return the request
     */
    public UpdateBusinesscallssettings updateBusinesscallssettings(java.lang.String name, com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings content) throws java.io.IOException {
      UpdateBusinesscallssettings result = new UpdateBusinesscallssettings(name, content);
      initialize(result);
      return result;
    }

    public class UpdateBusinesscallssettings extends MyBusinessBusinessCallsRequest<com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings> {

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

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

      /**
       * Updates the Business call settings for the specified location.
       *
       * Create a request for the method "locations.updateBusinesscallssettings".
       *
       * This request holds the parameters needed by the the mybusinessbusinesscalls server.  After
       * setting any optional parameters, call the {@link UpdateBusinesscallssettings#execute()} method
       * to invoke the remote operation. <p> {@link UpdateBusinesscallssettings#initialize(com.google.ap
       * i.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this
       * instance immediately after invoking the constructor. </p>
       *
       * @param name Required. The resource name of the calls settings. Format:
     *        locations/{location}/businesscallssettings
       * @param content the {@link com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings}
       * @since 1.13
       */
      protected UpdateBusinesscallssettings(java.lang.String name, com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings content) {
        super(MyBusinessBusinessCalls.this, "PATCH", REST_PATH, content, com.google.api.services.mybusinessbusinesscalls.v1.model.BusinessCallsSettings.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/[^/]+/businesscallssettings$");
        }
      }

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

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

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

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

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

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

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

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

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

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

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

      /**
       * Required. The resource name of the calls settings. Format:
       * locations/{location}/businesscallssettings
       */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** Required. The resource name of the calls settings. Format:
     locations/{location}/businesscallssettings
       */
      public java.lang.String getName() {
        return name;
      }

      /**
       * Required. The resource name of the calls settings. Format:
       * locations/{location}/businesscallssettings
       */
      public UpdateBusinesscallssettings 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/[^/]+/businesscallssettings$");
        }
        this.name = name;
        return this;
      }

      /** Required. The list of fields to update. */
      @com.google.api.client.util.Key
      private String updateMask;

      /** Required. The list of fields to update.
       */
      public String getUpdateMask() {
        return updateMask;
      }

      /** Required. The list of fields to update. */
      public UpdateBusinesscallssettings setUpdateMask(String updateMask) {
        this.updateMask = updateMask;
        return this;
      }

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

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

    /**
     * The "businesscallsinsights" collection of methods.
     */
    public class Businesscallsinsights {

      /**
       * Returns insights for Business calls for a location.
       *
       * Create a request for the method "businesscallsinsights.list".
       *
       * This request holds the parameters needed by the mybusinessbusinesscalls server.  After setting
       * any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The parent location to fetch calls insights for. Format: locations/{location_id}
       * @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 MyBusinessBusinessCallsRequest<com.google.api.services.mybusinessbusinesscalls.v1.model.ListBusinessCallsInsightsResponse> {

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

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

        /**
         * Returns insights for Business calls for a location.
         *
         * Create a request for the method "businesscallsinsights.list".
         *
         * This request holds the parameters needed by the the mybusinessbusinesscalls 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. The parent location to fetch calls insights for. Format: locations/{location_id}
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(MyBusinessBusinessCalls.this, "GET", REST_PATH, null, com.google.api.services.mybusinessbusinesscalls.v1.model.ListBusinessCallsInsightsResponse.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. The parent location to fetch calls insights for. Format:
         * locations/{location_id}
         */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The parent location to fetch calls insights for. Format: locations/{location_id}
         */
        public java.lang.String getParent() {
          return parent;
        }

        /**
         * Required. The parent location to fetch calls insights for. Format:
         * locations/{location_id}
         */
        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;
        }

        /**
         * Optional. A filter constraining the calls insights to return. The response includes only
         * entries that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is
         * returned. If no end_date is provided, the last date for which data is available is used.
         * If no start_date is provided, we will default to the first date for which data is
         * available, which is currently 6 months. If start_date is before the date when data is
         * available, data is returned starting from the date when it is available. At this time we
         * support following filters. 1. start_date="DATE" where date is in YYYY-MM-DD format. 2.
         * end_date="DATE" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a
         * valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., "start_date=2021-08-01
         * AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT" The AGGREGATE_COUNT metric_type
         * ignores the DD part of the date.
         */
        @com.google.api.client.util.Key
        private java.lang.String filter;

        /** Optional. A filter constraining the calls insights to return. The response includes only entries
       that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is returned. If no
       end_date is provided, the last date for which data is available is used. If no start_date is
       provided, we will default to the first date for which data is available, which is currently 6
       months. If start_date is before the date when data is available, data is returned starting from the
       date when it is available. At this time we support following filters. 1. start_date="DATE" where
       date is in YYYY-MM-DD format. 2. end_date="DATE" where date is in YYYY-MM-DD format. 3.
       metric_type=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g.,
       "start_date=2021-08-01 AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT" The AGGREGATE_COUNT
       metric_type ignores the DD part of the date.
         */
        public java.lang.String getFilter() {
          return filter;
        }

        /**
         * Optional. A filter constraining the calls insights to return. The response includes only
         * entries that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is
         * returned. If no end_date is provided, the last date for which data is available is used.
         * If no start_date is provided, we will default to the first date for which data is
         * available, which is currently 6 months. If start_date is before the date when data is
         * available, data is returned starting from the date when it is available. At this time we
         * support following filters. 1. start_date="DATE" where date is in YYYY-MM-DD format. 2.
         * end_date="DATE" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a
         * valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., "start_date=2021-08-01
         * AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT" The AGGREGATE_COUNT metric_type
         * ignores the DD part of the date.
         */
        public List setFilter(java.lang.String filter) {
          this.filter = filter;
          return this;
        }

        /**
         * Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most
         * 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single
         * page. For these metrics, the page_size is ignored.
         */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be
       returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics,
       the page_size is ignored.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /**
         * Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most
         * 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single
         * page. For these metrics, the page_size is ignored.
         */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /**
         * Optional. A page token, received from a previous `ListBusinessCallsInsights` call.
         * Provide this to retrieve the subsequent page. When paginating, all other parameters
         * provided to `ListBusinessCallsInsights` must match the call that provided the page token.
         * Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics,
         * the pake_token is ignored.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** Optional. A page token, received from a previous `ListBusinessCallsInsights` call. Provide this to
       retrieve the subsequent page. When paginating, all other parameters provided to
       `ListBusinessCallsInsights` must match the call that provided the page token. Some of the
       metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is
       ignored.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * Optional. A page token, received from a previous `ListBusinessCallsInsights` call.
         * Provide this to retrieve the subsequent page. When paginating, all other parameters
         * provided to `ListBusinessCallsInsights` must match the call that provided the page token.
         * Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics,
         * the pake_token is ignored.
         */
        public List setPageToken(java.lang.String pageToken) {
          this.pageToken = pageToken;
          return this;
        }

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

    }
  }

  /**
   * Builder for {@link MyBusinessBusinessCalls}.
   *
   * <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 MyBusinessBusinessCalls}. */
    @Override
    public MyBusinessBusinessCalls build() {
      return new MyBusinessBusinessCalls(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 MyBusinessBusinessCallsRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setMyBusinessBusinessCallsRequestInitializer(
        MyBusinessBusinessCallsRequestInitializer mybusinessbusinesscallsRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(mybusinessbusinesscallsRequestInitializer);
    }

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