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

io.kubernetes.client.openapi.models.V1beta1CustomResourceDefinitionNames Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
/*
Copyright 2021 The Kubernetes Authors.
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 io.kubernetes.client.openapi.models;

import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition */
@ApiModel(
    description =
        "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition")
@javax.annotation.Generated(
    value = "org.openapitools.codegen.languages.JavaClientCodegen",
    date = "2021-01-04T09:55:14.976Z[Etc/UTC]")
public class V1beta1CustomResourceDefinitionNames {
  public static final String SERIALIZED_NAME_CATEGORIES = "categories";

  @SerializedName(SERIALIZED_NAME_CATEGORIES)
  private List categories = null;

  public static final String SERIALIZED_NAME_KIND = "kind";

  @SerializedName(SERIALIZED_NAME_KIND)
  private String kind;

  public static final String SERIALIZED_NAME_LIST_KIND = "listKind";

  @SerializedName(SERIALIZED_NAME_LIST_KIND)
  private String listKind;

  public static final String SERIALIZED_NAME_PLURAL = "plural";

  @SerializedName(SERIALIZED_NAME_PLURAL)
  private String plural;

  public static final String SERIALIZED_NAME_SHORT_NAMES = "shortNames";

  @SerializedName(SERIALIZED_NAME_SHORT_NAMES)
  private List shortNames = null;

  public static final String SERIALIZED_NAME_SINGULAR = "singular";

  @SerializedName(SERIALIZED_NAME_SINGULAR)
  private String singular;

  public V1beta1CustomResourceDefinitionNames categories(List categories) {

    this.categories = categories;
    return this;
  }

  public V1beta1CustomResourceDefinitionNames addCategoriesItem(String categoriesItem) {
    if (this.categories == null) {
      this.categories = new ArrayList<>();
    }
    this.categories.add(categoriesItem);
    return this;
  }

  /**
   * categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
   * This is published in API discovery documents, and used by clients to support invocations like
   * `kubectl get all`.
   *
   * @return categories
   */
  @javax.annotation.Nullable
  @ApiModelProperty(
      value =
          "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.")
  public List getCategories() {
    return categories;
  }

  public void setCategories(List categories) {
    this.categories = categories;
  }

  public V1beta1CustomResourceDefinitionNames kind(String kind) {

    this.kind = kind;
    return this;
  }

  /**
   * kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom
   * resource instances will use this value as the `kind` attribute in API calls.
   *
   * @return kind
   */
  @ApiModelProperty(
      required = true,
      value =
          "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.")
  public String getKind() {
    return kind;
  }

  public void setKind(String kind) {
    this.kind = kind;
  }

  public V1beta1CustomResourceDefinitionNames listKind(String listKind) {

    this.listKind = listKind;
    return this;
  }

  /**
   * listKind is the serialized kind of the list for this resource. Defaults to
   * \"`kind`List\".
   *
   * @return listKind
   */
  @javax.annotation.Nullable
  @ApiModelProperty(
      value =
          "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".")
  public String getListKind() {
    return listKind;
  }

  public void setListKind(String listKind) {
    this.listKind = listKind;
  }

  public V1beta1CustomResourceDefinitionNames plural(String plural) {

    this.plural = plural;
    return this;
  }

  /**
   * plural is the plural name of the resource to serve. The custom resources are served under
   * `/apis/<group>/<version>/.../<plural>`. Must match the name of the
   * CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be
   * all lowercase.
   *
   * @return plural
   */
  @ApiModelProperty(
      required = true,
      value =
          "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.")
  public String getPlural() {
    return plural;
  }

  public void setPlural(String plural) {
    this.plural = plural;
  }

  public V1beta1CustomResourceDefinitionNames shortNames(List shortNames) {

    this.shortNames = shortNames;
    return this;
  }

  public V1beta1CustomResourceDefinitionNames addShortNamesItem(String shortNamesItem) {
    if (this.shortNames == null) {
      this.shortNames = new ArrayList<>();
    }
    this.shortNames.add(shortNamesItem);
    return this;
  }

  /**
   * shortNames are short names for the resource, exposed in API discovery documents, and used by
   * clients to support invocations like `kubectl get <shortname>`. It must be all
   * lowercase.
   *
   * @return shortNames
   */
  @javax.annotation.Nullable
  @ApiModelProperty(
      value =
          "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.")
  public List getShortNames() {
    return shortNames;
  }

  public void setShortNames(List shortNames) {
    this.shortNames = shortNames;
  }

  public V1beta1CustomResourceDefinitionNames singular(String singular) {

    this.singular = singular;
    return this;
  }

  /**
   * singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased
   * `kind`.
   *
   * @return singular
   */
  @javax.annotation.Nullable
  @ApiModelProperty(
      value =
          "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.")
  public String getSingular() {
    return singular;
  }

  public void setSingular(String singular) {
    this.singular = singular;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1beta1CustomResourceDefinitionNames v1beta1CustomResourceDefinitionNames =
        (V1beta1CustomResourceDefinitionNames) o;
    return Objects.equals(this.categories, v1beta1CustomResourceDefinitionNames.categories)
        && Objects.equals(this.kind, v1beta1CustomResourceDefinitionNames.kind)
        && Objects.equals(this.listKind, v1beta1CustomResourceDefinitionNames.listKind)
        && Objects.equals(this.plural, v1beta1CustomResourceDefinitionNames.plural)
        && Objects.equals(this.shortNames, v1beta1CustomResourceDefinitionNames.shortNames)
        && Objects.equals(this.singular, v1beta1CustomResourceDefinitionNames.singular);
  }

  @Override
  public int hashCode() {
    return Objects.hash(categories, kind, listKind, plural, shortNames, singular);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1beta1CustomResourceDefinitionNames {\n");
    sb.append("    categories: ").append(toIndentedString(categories)).append("\n");
    sb.append("    kind: ").append(toIndentedString(kind)).append("\n");
    sb.append("    listKind: ").append(toIndentedString(listKind)).append("\n");
    sb.append("    plural: ").append(toIndentedString(plural)).append("\n");
    sb.append("    shortNames: ").append(toIndentedString(shortNames)).append("\n");
    sb.append("    singular: ").append(toIndentedString(singular)).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