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

fi.metatavu.restfulptv.client.model.ServiceHour Maven / Gradle / Ivy

There is a newer version: 1.4.9
Show newest version
/**
 * RESTful PTV
 * Restful way to use Palvelutietovaranto.
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 * 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.
 */


package fi.metatavu.restfulptv.client.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import fi.metatavu.restfulptv.client.model.DailyOpeningTime;
import fi.metatavu.restfulptv.client.model.LanguageItem;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;


@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
/**
 * ServiceHour
 */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-04-10T20:24:26.046+03:00")
public class ServiceHour   {
  @JsonProperty("serviceHourType")
  private String serviceHourType = null;

  @JsonProperty("validFrom")
  private OffsetDateTime validFrom = null;

  @JsonProperty("validTo")
  private OffsetDateTime validTo = null;

  @JsonProperty("isClosed")
  private Boolean isClosed = null;

  @JsonProperty("validForNow")
  private Boolean validForNow = null;

  @JsonProperty("additionalInformation")
  private List additionalInformation = new ArrayList();

  @JsonProperty("openingHour")
  private List openingHour = new ArrayList();

  public ServiceHour serviceHourType(String serviceHourType) {
    this.serviceHourType = serviceHourType;
    return this;
  }

   /**
   * Get serviceHourType
   * @return serviceHourType
  **/
  @ApiModelProperty(example = "null", value = "")
  public String getServiceHourType() {
    return serviceHourType;
  }

  public void setServiceHourType(String serviceHourType) {
    this.serviceHourType = serviceHourType;
  }

  public ServiceHour validFrom(OffsetDateTime validFrom) {
    this.validFrom = validFrom;
    return this;
  }

   /**
   * Date time where from this entry is valid.
   * @return validFrom
  **/
  @ApiModelProperty(example = "null", value = "Date time where from this entry is valid.")
  public OffsetDateTime getValidFrom() {
    return validFrom;
  }

  public void setValidFrom(OffsetDateTime validFrom) {
    this.validFrom = validFrom;
  }

  public ServiceHour validTo(OffsetDateTime validTo) {
    this.validTo = validTo;
    return this;
  }

   /**
   * Date time to this entry is valid.
   * @return validTo
  **/
  @ApiModelProperty(example = "null", value = "Date time to this entry is valid.")
  public OffsetDateTime getValidTo() {
    return validTo;
  }

  public void setValidTo(OffsetDateTime validTo) {
    this.validTo = validTo;
  }

  public ServiceHour isClosed(Boolean isClosed) {
    this.isClosed = isClosed;
    return this;
  }

   /**
   * Set to true to present a time between the valid from and to times as closed.
   * @return isClosed
  **/
  @ApiModelProperty(example = "null", value = "Set to true to present a time between the valid from and to times as closed.")
  public Boolean getIsClosed() {
    return isClosed;
  }

  public void setIsClosed(Boolean isClosed) {
    this.isClosed = isClosed;
  }

  public ServiceHour validForNow(Boolean validForNow) {
    this.validForNow = validForNow;
    return this;
  }

   /**
   * Set to true to present that this entry is valid for now.
   * @return validForNow
  **/
  @ApiModelProperty(example = "null", value = "Set to true to present that this entry is valid for now.")
  public Boolean getValidForNow() {
    return validForNow;
  }

  public void setValidForNow(Boolean validForNow) {
    this.validForNow = validForNow;
  }

  public ServiceHour additionalInformation(List additionalInformation) {
    this.additionalInformation = additionalInformation;
    return this;
  }

  public ServiceHour addAdditionalInformationItem(LanguageItem additionalInformationItem) {
    this.additionalInformation.add(additionalInformationItem);
    return this;
  }

   /**
   * Localized list of additional information.
   * @return additionalInformation
  **/
  @ApiModelProperty(example = "null", value = "Localized list of additional information.")
  public List getAdditionalInformation() {
    return additionalInformation;
  }

  public void setAdditionalInformation(List additionalInformation) {
    this.additionalInformation = additionalInformation;
  }

  public ServiceHour openingHour(List openingHour) {
    this.openingHour = openingHour;
    return this;
  }

  public ServiceHour addOpeningHourItem(DailyOpeningTime openingHourItem) {
    this.openingHour.add(openingHourItem);
    return this;
  }

   /**
   * List of servicing hours (open and closes times).
   * @return openingHour
  **/
  @ApiModelProperty(example = "null", value = "List of servicing hours (open and closes times).")
  public List getOpeningHour() {
    return openingHour;
  }

  public void setOpeningHour(List openingHour) {
    this.openingHour = openingHour;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ServiceHour serviceHour = (ServiceHour) o;
    return Objects.equals(this.serviceHourType, serviceHour.serviceHourType) &&
        Objects.equals(this.validFrom, serviceHour.validFrom) &&
        Objects.equals(this.validTo, serviceHour.validTo) &&
        Objects.equals(this.isClosed, serviceHour.isClosed) &&
        Objects.equals(this.validForNow, serviceHour.validForNow) &&
        Objects.equals(this.additionalInformation, serviceHour.additionalInformation) &&
        Objects.equals(this.openingHour, serviceHour.openingHour);
  }

  @Override
  public int hashCode() {
    return Objects.hash(serviceHourType, validFrom, validTo, isClosed, validForNow, additionalInformation, openingHour);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ServiceHour {\n");
    
    sb.append("    serviceHourType: ").append(toIndentedString(serviceHourType)).append("\n");
    sb.append("    validFrom: ").append(toIndentedString(validFrom)).append("\n");
    sb.append("    validTo: ").append(toIndentedString(validTo)).append("\n");
    sb.append("    isClosed: ").append(toIndentedString(isClosed)).append("\n");
    sb.append("    validForNow: ").append(toIndentedString(validForNow)).append("\n");
    sb.append("    additionalInformation: ").append(toIndentedString(additionalInformation)).append("\n");
    sb.append("    openingHour: ").append(toIndentedString(openingHour)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy