Class APIResource

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class APIResource
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    APIResource specifies the name of a resource and whether it is namespaced.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  APIResource.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      APIResource()  
      APIResource​(java.util.List<java.lang.String> categories, java.lang.String group, @NonNull java.lang.String kind, @NonNull java.lang.String name, @NonNull java.lang.Boolean namespaced, java.util.List<java.lang.String> shortNames, @NonNull java.lang.String singularName, java.lang.String storageVersionHash, @NonNull java.util.List<java.lang.String> verbs, java.lang.String version)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static APIResource.Builder builder()  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.util.List<java.lang.String> getCategories()
      categories is a list of the grouped resources this resource belongs to (e.g.
      java.lang.String getGroup()
      group is the preferred group of the resource.
      @NonNull java.lang.String getKind()
      kind is the kind for the resource (e.g.
      @NonNull java.lang.String getName()
      name is the plural name of the resource.
      @NonNull java.lang.Boolean getNamespaced()
      namespaced indicates if a resource is namespaced or not.
      java.util.List<java.lang.String> getShortNames()
      shortNames is a list of suggested short names of the resource.
      @NonNull java.lang.String getSingularName()
      singularName is the singular name of the resource.
      java.lang.String getStorageVersionHash()
      The hash value of the storage version, the version this resource is converted to when written to the data store.
      @NonNull java.util.List<java.lang.String> getVerbs()
      verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
      java.lang.String getVersion()
      version is the preferred version of the resource.
      int hashCode()  
      void setCategories​(java.util.List<java.lang.String> categories)
      categories is a list of the grouped resources this resource belongs to (e.g.
      void setGroup​(java.lang.String group)
      group is the preferred group of the resource.
      void setKind​(@NonNull java.lang.String kind)
      kind is the kind for the resource (e.g.
      void setName​(@NonNull java.lang.String name)
      name is the plural name of the resource.
      void setNamespaced​(@NonNull java.lang.Boolean namespaced)
      namespaced indicates if a resource is namespaced or not.
      void setShortNames​(java.util.List<java.lang.String> shortNames)
      shortNames is a list of suggested short names of the resource.
      void setSingularName​(@NonNull java.lang.String singularName)
      singularName is the singular name of the resource.
      void setStorageVersionHash​(java.lang.String storageVersionHash)
      The hash value of the storage version, the version this resource is converted to when written to the data store.
      void setVerbs​(@NonNull java.util.List<java.lang.String> verbs)
      verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
      void setVersion​(java.lang.String version)
      version is the preferred version of the resource.
      APIResource.Builder toBuilder()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • APIResource

        public APIResource​(java.util.List<java.lang.String> categories,
                           java.lang.String group,
                           @NonNull
                           @NonNull java.lang.String kind,
                           @NonNull
                           @NonNull java.lang.String name,
                           @NonNull
                           @NonNull java.lang.Boolean namespaced,
                           java.util.List<java.lang.String> shortNames,
                           @NonNull
                           @NonNull java.lang.String singularName,
                           java.lang.String storageVersionHash,
                           @NonNull
                           @NonNull java.util.List<java.lang.String> verbs,
                           java.lang.String version)
      • APIResource

        public APIResource()
    • Method Detail

      • getCategories

        public java.util.List<java.lang.String> getCategories()
        categories is a list of the grouped resources this resource belongs to (e.g. 'all')
      • getGroup

        public java.lang.String getGroup()
        group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale".
      • getKind

        @NonNull
        public @NonNull java.lang.String getKind()
        kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
      • getName

        @NonNull
        public @NonNull java.lang.String getName()
        name is the plural name of the resource.
      • getNamespaced

        @NonNull
        public @NonNull java.lang.Boolean getNamespaced()
        namespaced indicates if a resource is namespaced or not.
      • getShortNames

        public java.util.List<java.lang.String> getShortNames()
        shortNames is a list of suggested short names of the resource.
      • getSingularName

        @NonNull
        public @NonNull java.lang.String getSingularName()
        singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.
      • getStorageVersionHash

        public java.lang.String getStorageVersionHash()
        The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.
      • getVerbs

        @NonNull
        public @NonNull java.util.List<java.lang.String> getVerbs()
        verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
      • getVersion

        public java.lang.String getVersion()
        version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)".
      • setCategories

        public void setCategories​(java.util.List<java.lang.String> categories)
        categories is a list of the grouped resources this resource belongs to (e.g. 'all')
      • setGroup

        public void setGroup​(java.lang.String group)
        group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale".
      • setKind

        public void setKind​(@NonNull
                            @NonNull java.lang.String kind)
        kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
      • setName

        public void setName​(@NonNull
                            @NonNull java.lang.String name)
        name is the plural name of the resource.
      • setNamespaced

        public void setNamespaced​(@NonNull
                                  @NonNull java.lang.Boolean namespaced)
        namespaced indicates if a resource is namespaced or not.
      • setShortNames

        public void setShortNames​(java.util.List<java.lang.String> shortNames)
        shortNames is a list of suggested short names of the resource.
      • setSingularName

        public void setSingularName​(@NonNull
                                    @NonNull java.lang.String singularName)
        singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.
      • setStorageVersionHash

        public void setStorageVersionHash​(java.lang.String storageVersionHash)
        The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.
      • setVerbs

        public void setVerbs​(@NonNull
                             @NonNull java.util.List<java.lang.String> verbs)
        verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
      • setVersion

        public void setVersion​(java.lang.String version)
        version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)".
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object