/*
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.10.4
 * 
 *
 * 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 io.kubernetes.client.models;

import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.kubernetes.client.models.V1beta1CustomResourceDefinitionNames;
import io.kubernetes.client.models.V1beta1CustomResourceSubresources;
import io.kubernetes.client.models.V1beta1CustomResourceValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * CustomResourceDefinitionSpec describes how a user wants their resource to appear
 */
@ApiModel(description = "CustomResourceDefinitionSpec describes how a user wants their resource to appear")

public class V1beta1CustomResourceDefinitionSpec {
  @SerializedName("group")
  private String group = null;

  @SerializedName("names")
  private V1beta1CustomResourceDefinitionNames names = null;

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

  @SerializedName("subresources")
  private V1beta1CustomResourceSubresources subresources = null;

  @SerializedName("validation")
  private V1beta1CustomResourceValidation validation = null;

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

  public V1beta1CustomResourceDefinitionSpec group(String group) {
    this.group = group;
    return this;
  }

   /**
   * Group is the group this resource belongs in
   * @return group
  **/
  @ApiModelProperty(required = true, value = "Group is the group this resource belongs in")
  public String getGroup() {
    return group;
  }

  public void setGroup(String group) {
    this.group = group;
  }

  public V1beta1CustomResourceDefinitionSpec names(V1beta1CustomResourceDefinitionNames names) {
    this.names = names;
    return this;
  }

   /**
   * Names are the names used to describe this custom resource
   * @return names
  **/
  @ApiModelProperty(required = true, value = "Names are the names used to describe this custom resource")
  public V1beta1CustomResourceDefinitionNames getNames() {
    return names;
  }

  public void setNames(V1beta1CustomResourceDefinitionNames names) {
    this.names = names;
  }

  public V1beta1CustomResourceDefinitionSpec scope(String scope) {
    this.scope = scope;
    return this;
  }

   /**
   * Scope indicates whether this resource is cluster or namespace scoped.  Default is namespaced
   * @return scope
  **/
  @ApiModelProperty(required = true, value = "Scope indicates whether this resource is cluster or namespace scoped.  Default is namespaced")
  public String getScope() {
    return scope;
  }

  public void setScope(String scope) {
    this.scope = scope;
  }

  public V1beta1CustomResourceDefinitionSpec subresources(V1beta1CustomResourceSubresources subresources) {
    this.subresources = subresources;
    return this;
  }

   /**
   * Subresources describes the subresources for CustomResources This field is alpha-level and should only be sent to servers that enable subresources via the CustomResourceSubresources feature gate.
   * @return subresources
  **/
  @ApiModelProperty(value = "Subresources describes the subresources for CustomResources This field is alpha-level and should only be sent to servers that enable subresources via the CustomResourceSubresources feature gate.")
  public V1beta1CustomResourceSubresources getSubresources() {
    return subresources;
  }

  public void setSubresources(V1beta1CustomResourceSubresources subresources) {
    this.subresources = subresources;
  }

  public V1beta1CustomResourceDefinitionSpec validation(V1beta1CustomResourceValidation validation) {
    this.validation = validation;
    return this;
  }

   /**
   * Validation describes the validation methods for CustomResources
   * @return validation
  **/
  @ApiModelProperty(value = "Validation describes the validation methods for CustomResources")
  public V1beta1CustomResourceValidation getValidation() {
    return validation;
  }

  public void setValidation(V1beta1CustomResourceValidation validation) {
    this.validation = validation;
  }

  public V1beta1CustomResourceDefinitionSpec version(String version) {
    this.version = version;
    return this;
  }

   /**
   * Version is the version this resource belongs in
   * @return version
  **/
  @ApiModelProperty(required = true, value = "Version is the version this resource belongs in")
  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1beta1CustomResourceDefinitionSpec v1beta1CustomResourceDefinitionSpec = (V1beta1CustomResourceDefinitionSpec) o;
    return Objects.equals(this.group, v1beta1CustomResourceDefinitionSpec.group) &&
        Objects.equals(this.names, v1beta1CustomResourceDefinitionSpec.names) &&
        Objects.equals(this.scope, v1beta1CustomResourceDefinitionSpec.scope) &&
        Objects.equals(this.subresources, v1beta1CustomResourceDefinitionSpec.subresources) &&
        Objects.equals(this.validation, v1beta1CustomResourceDefinitionSpec.validation) &&
        Objects.equals(this.version, v1beta1CustomResourceDefinitionSpec.version);
  }

  @Override
  public int hashCode() {
    return Objects.hash(group, names, scope, subresources, validation, version);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1beta1CustomResourceDefinitionSpec {\n");
    
    sb.append("    group: ").append(toIndentedString(group)).append("\n");
    sb.append("    names: ").append(toIndentedString(names)).append("\n");
    sb.append("    scope: ").append(toIndentedString(scope)).append("\n");
    sb.append("    subresources: ").append(toIndentedString(subresources)).append("\n");
    sb.append("    validation: ").append(toIndentedString(validation)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).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    ");
  }

}

