/*
 * 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.jobs.v3p1beta1.model;

/**
 * Input only. Parameters needed for commute search.
 *
 * <p> 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 Cloud Talent Solution API. For a detailed explanation
 * see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class CommuteFilter extends com.google.api.client.json.GenericJson {

  /**
   * Optional. If true, jobs without "precise" addresses (street level addresses or GPS coordinates)
   * might also be returned. For city and coarser level addresses, text matching is used. If this
   * field is set to false or is not specified, only jobs that include precise addresses are
   * returned by Commute Search. Note: If `allow_imprecise_addresses` is set to true, Commute Search
   * is not able to calculate accurate commute times to jobs with city level and coarser address
   * information. Jobs with imprecise addresses will return a `travel_duration` time of 0 regardless
   * of distance from the job seeker.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean allowImpreciseAddresses;

  /**
   * Required. The method of transportation for which to calculate the commute time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String commuteMethod;

  /**
   * Optional. The departure time used to calculate traffic impact, represented as
   * google.type.TimeOfDay in local time zone. Currently traffic model is restricted to hour level
   * resolution.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TimeOfDay departureTime;

  /**
   * Optional. Specifies the traffic density to use when calculating commute time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String roadTraffic;

  /**
   * Required. The latitude and longitude of the location from which to calculate the commute time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LatLng startCoordinates;

  /**
   * Required. The maximum travel time in seconds. The maximum allowed value is `3600s` (one hour).
   * Format is `123s`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String travelDuration;

  /**
   * Optional. If true, jobs without "precise" addresses (street level addresses or GPS coordinates)
   * might also be returned. For city and coarser level addresses, text matching is used. If this
   * field is set to false or is not specified, only jobs that include precise addresses are
   * returned by Commute Search. Note: If `allow_imprecise_addresses` is set to true, Commute Search
   * is not able to calculate accurate commute times to jobs with city level and coarser address
   * information. Jobs with imprecise addresses will return a `travel_duration` time of 0 regardless
   * of distance from the job seeker.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getAllowImpreciseAddresses() {
    return allowImpreciseAddresses;
  }

  /**
   * Optional. If true, jobs without "precise" addresses (street level addresses or GPS coordinates)
   * might also be returned. For city and coarser level addresses, text matching is used. If this
   * field is set to false or is not specified, only jobs that include precise addresses are
   * returned by Commute Search. Note: If `allow_imprecise_addresses` is set to true, Commute Search
   * is not able to calculate accurate commute times to jobs with city level and coarser address
   * information. Jobs with imprecise addresses will return a `travel_duration` time of 0 regardless
   * of distance from the job seeker.
   * @param allowImpreciseAddresses allowImpreciseAddresses or {@code null} for none
   */
  public CommuteFilter setAllowImpreciseAddresses(java.lang.Boolean allowImpreciseAddresses) {
    this.allowImpreciseAddresses = allowImpreciseAddresses;
    return this;
  }

  /**
   * Required. The method of transportation for which to calculate the commute time.
   * @return value or {@code null} for none
   */
  public java.lang.String getCommuteMethod() {
    return commuteMethod;
  }

  /**
   * Required. The method of transportation for which to calculate the commute time.
   * @param commuteMethod commuteMethod or {@code null} for none
   */
  public CommuteFilter setCommuteMethod(java.lang.String commuteMethod) {
    this.commuteMethod = commuteMethod;
    return this;
  }

  /**
   * Optional. The departure time used to calculate traffic impact, represented as
   * google.type.TimeOfDay in local time zone. Currently traffic model is restricted to hour level
   * resolution.
   * @return value or {@code null} for none
   */
  public TimeOfDay getDepartureTime() {
    return departureTime;
  }

  /**
   * Optional. The departure time used to calculate traffic impact, represented as
   * google.type.TimeOfDay in local time zone. Currently traffic model is restricted to hour level
   * resolution.
   * @param departureTime departureTime or {@code null} for none
   */
  public CommuteFilter setDepartureTime(TimeOfDay departureTime) {
    this.departureTime = departureTime;
    return this;
  }

  /**
   * Optional. Specifies the traffic density to use when calculating commute time.
   * @return value or {@code null} for none
   */
  public java.lang.String getRoadTraffic() {
    return roadTraffic;
  }

  /**
   * Optional. Specifies the traffic density to use when calculating commute time.
   * @param roadTraffic roadTraffic or {@code null} for none
   */
  public CommuteFilter setRoadTraffic(java.lang.String roadTraffic) {
    this.roadTraffic = roadTraffic;
    return this;
  }

  /**
   * Required. The latitude and longitude of the location from which to calculate the commute time.
   * @return value or {@code null} for none
   */
  public LatLng getStartCoordinates() {
    return startCoordinates;
  }

  /**
   * Required. The latitude and longitude of the location from which to calculate the commute time.
   * @param startCoordinates startCoordinates or {@code null} for none
   */
  public CommuteFilter setStartCoordinates(LatLng startCoordinates) {
    this.startCoordinates = startCoordinates;
    return this;
  }

  /**
   * Required. The maximum travel time in seconds. The maximum allowed value is `3600s` (one hour).
   * Format is `123s`.
   * @return value or {@code null} for none
   */
  public String getTravelDuration() {
    return travelDuration;
  }

  /**
   * Required. The maximum travel time in seconds. The maximum allowed value is `3600s` (one hour).
   * Format is `123s`.
   * @param travelDuration travelDuration or {@code null} for none
   */
  public CommuteFilter setTravelDuration(String travelDuration) {
    this.travelDuration = travelDuration;
    return this;
  }

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

  @Override
  public CommuteFilter clone() {
    return (CommuteFilter) super.clone();
  }

}
