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

com.blackducksoftware.integration.hub.model.VersionBomLicenseView Maven / Gradle / Ivy

There is a newer version: 3.4.2.1
Show newest version
/**
 * hub-model-common
 *
 * Copyright (C) 2017 Black Duck Software, Inc.
 * http://www.blackducksoftware.com/
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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.
 */
/*
 * 
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * 
 * 
 *
 * 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.
 */


package com.blackducksoftware.integration.hub.model;

import java.util.Objects;

import com.blackducksoftware.integration.hub.model.VersionBomLicenseView;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * VersionBomLicenseView
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-02-02T14:22:10.992-05:00")
public class VersionBomLicenseView {
  @SerializedName("license")
  private String license = null;

  @SerializedName("licenseDisplay")
  private String licenseDisplay = null;

  /**
   * How this license is related to other licenses within a given context
   */
  public enum LicenseTypeEnum {
    @SerializedName("CONJUNCTIVE")
    CONJUNCTIVE("CONJUNCTIVE"),
    
    @SerializedName("DISJUNCTIVE")
    DISJUNCTIVE("DISJUNCTIVE");

    private String value;

    LicenseTypeEnum(String value) {
      this.value = value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
  }

  @SerializedName("licenseType")
  private LicenseTypeEnum licenseType = null;

  @SerializedName("licenses")
  private List licenses = new ArrayList();

  public VersionBomLicenseView license(String license) {
    this.license = license;
    return this;
  }

   /**
   * Reference to the full representation of the license
   * @return license
  **/
  @ApiModelProperty(example = "null", required = true, value = "Reference to the full representation of the license")
  public String getLicense() {
    return license;
  }

  public void setLicense(String license) {
    this.license = license;
  }

  public VersionBomLicenseView licenseDisplay(String licenseDisplay) {
    this.licenseDisplay = licenseDisplay;
    return this;
  }

   /**
   * Label distinguishing the license from other licenses
   * @return licenseDisplay
  **/
  @ApiModelProperty(example = "null", value = "Label distinguishing the license from other licenses")
  public String getLicenseDisplay() {
    return licenseDisplay;
  }

  public void setLicenseDisplay(String licenseDisplay) {
    this.licenseDisplay = licenseDisplay;
  }

  public VersionBomLicenseView licenseType(LicenseTypeEnum licenseType) {
    this.licenseType = licenseType;
    return this;
  }

   /**
   * How this license is related to other licenses within a given context
   * @return licenseType
  **/
  @ApiModelProperty(example = "null", value = "How this license is related to other licenses within a given context")
  public LicenseTypeEnum getLicenseType() {
    return licenseType;
  }

  public void setLicenseType(LicenseTypeEnum licenseType) {
    this.licenseType = licenseType;
  }

  public VersionBomLicenseView licenses(List licenses) {
    this.licenses = licenses;
    return this;
  }

  public VersionBomLicenseView addLicensesItem(VersionBomLicenseView licensesItem) {
    this.licenses.add(licensesItem);
    return this;
  }

   /**
   * Additional licenses related to this license via the provided type
   * @return licenses
  **/
  @ApiModelProperty(example = "null", value = "Additional licenses related to this license via the provided type")
  public List getLicenses() {
    return licenses;
  }

  public void setLicenses(List licenses) {
    this.licenses = licenses;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VersionBomLicenseView versionBomLicenseView = (VersionBomLicenseView) o;
    return Objects.equals(this.license, versionBomLicenseView.license) &&
        Objects.equals(this.licenseDisplay, versionBomLicenseView.licenseDisplay) &&
        Objects.equals(this.licenseType, versionBomLicenseView.licenseType) &&
        Objects.equals(this.licenses, versionBomLicenseView.licenses);
  }

  @Override
  public int hashCode() {
    return Objects.hash(license, licenseDisplay, licenseType, licenses);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VersionBomLicenseView {\n");
    
    sb.append("    license: ").append(toIndentedString(license)).append("\n");
    sb.append("    licenseDisplay: ").append(toIndentedString(licenseDisplay)).append("\n");
    sb.append("    licenseType: ").append(toIndentedString(licenseType)).append("\n");
    sb.append("    licenses: ").append(toIndentedString(licenses)).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