// Path: src/com/github/tinselspoon/intellij/kubernetes/model/ArrayItems.java
// public class ArrayItems {
// 
//     /** A reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set. */
//     @SerializedName("$ref")
//     private String ref;
// 
//     /** The type of the items. Either this property or {@link #getRef() ref} should be set. */
//     private FieldType type;
// 
//     /**
//      * Gets a reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set.
//      *
//      * @return the ref.
//      */
//     public String getRef() {
//         return ref;
//     }
// 
//     /**
//      * Gets the type of the items. Either this property or {@link #getRef() ref} should be set.
//      *
//      * @return the type.
//      */
//     public FieldType getType() {
//         return type;
//     }
// 
//     /**
//      * Sets a reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set.
//      *
//      * @param ref the new ref.
//      */
//     public void setRef(final String ref) {
//         this.ref = ref;
//     }
// 
//     /**
//      * Sets the type of the items. Either this property or {@link #getRef() ref} should be set.
//      *
//      * @param type the new type.
//      */
//     public void setType(final FieldType type) {
//         this.type = type;
//     }
// }
// 
// Path: src/com/github/tinselspoon/intellij/kubernetes/model/FieldType.java
// public enum FieldType {
// 
//     /** An integer property data type. */
//     @SerializedName("integer")
//     INTEGER,
// 
//     /** A number property data type (i.e. may have a decimal point). */
//     @SerializedName("number")
//     NUMBER,
// 
//     /** A string property data type. */
//     @SerializedName("string")
//     STRING,
// 
//     /** A boolean property data type. */
//     @SerializedName("boolean")
//     BOOLEAN,
// 
//     /** An array property data type. */
//     @SerializedName("array")
//     ARRAY,
// 
//     /** An unstructured object property data type. */
//     @SerializedName("object")
//     OBJECT;
// 
//     @Override
//     public String toString() {
//         return name().toLowerCase();
//     }
// }
// 
// Path: src/com/github/tinselspoon/intellij/kubernetes/model/Property.java
// public class Property {
// 
//     /** A description of this property. */
//     private String description;
// 
//     /** For properties that are arrays, describes the items that may appear in the array ({@code null} otherwise). */
//     private ArrayItems items;
// 
//     /** The model ID which describes the possible child properties of this property, or {@code null} if not applicable. */
//     @SerializedName("$ref")
//     private String ref;
// 
//     /** The type of this property. Should not be set if {@link #getRef() ref} is populated. */
//     private FieldType type;
// 
//     /**
//      * Gets a description of this property.
//      *
//      * @return the description.
//      */
//     public String getDescription() {
//         return description;
//     }
// 
//     /**
//      * Gets for properties that are arrays, describes the items that may appear in the array ({@code null} otherwise).
//      *
//      * @return the items.
//      */
//     public ArrayItems getItems() {
//         return items;
//     }
// 
//     /**
//      * Gets the model ID which describes the possible child properties of this property, or {@code null} if not applicable.
//      *
//      * @return the ref.
//      */
//     public String getRef() {
//         return ref;
//     }
// 
//     /**
//      * Gets the type of this property. Should not be set if {@link #getRef() ref} is populated.
//      *
//      * @return the type.
//      */
//     public FieldType getType() {
//         return type;
//     }
// 
//     /**
//      * Sets a description of this property.
//      *
//      * @param description the new description.
//      */
//     public void setDescription(final String description) {
//         this.description = description;
//     }
// 
//     /**
//      * Sets for properties that are arrays, describes the items that may appear in the array ({@code null} otherwise).
//      *
//      * @param items the new items.
//      */
//     public void setItems(final ArrayItems items) {
//         this.items = items;
//     }
// 
//     /**
//      * Sets the model ID which describes the possible child properties of this property, or {@code null} if not applicable.
//      *
//      * @param ref the new ref.
//      */
//     public void setRef(final String ref) {
//         this.ref = ref;
//     }
// 
//     /**
//      * Sets the type of this property. Should not be set if {@link #getRef() ref} is populated.
//      *
//      * @param type the new type.
//      */
//     public void setType(final FieldType type) {
//         this.type = type;
//     }
// }


import java.util.Objects;
import org.jetbrains.annotations.NotNull;
import com.github.tinselspoon.intellij.kubernetes.model.ArrayItems;
import com.github.tinselspoon.intellij.kubernetes.model.FieldType;
import com.github.tinselspoon.intellij.kubernetes.model.Property;
package com.github.tinselspoon.intellij.kubernetes;




/**
 * Utilities for working with model classes.
 */
final class ModelUtil {

    /** Static class private constructor. */
    private ModelUtil() {
    }

    /**
     * Get a string that describes the type of a particular property.
     * <p>
     * If the property is a basic type (string, integer etc) then the type name is returned. If the property type refers to a model, the model name is returned. If the property is an array, then the
     * process described previously is carried out for the array item type, and the string "[]" is appended to the end.
     *
     * @param propertySpec the property to obtain the type string for.
     * @return the type string.
     */
    @NotNull
    static String typeStringFor(@NotNull final Property propertySpec) {
// Path: src/com/github/tinselspoon/intellij/kubernetes/model/ArrayItems.java
// public class ArrayItems {
// 
//     /** A reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set. */
//     @SerializedName("$ref")
//     private String ref;
// 
//     /** The type of the items. Either this property or {@link #getRef() ref} should be set. */
//     private FieldType type;
// 
//     /**
//      * Gets a reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set.
//      *
//      * @return the ref.
//      */
//     public String getRef() {
//         return ref;
//     }
// 
//     /**
//      * Gets the type of the items. Either this property or {@link #getRef() ref} should be set.
//      *
//      * @return the type.
//      */
//     public FieldType getType() {
//         return type;
//     }
// 
//     /**
//      * Sets a reference to a model ID which the items conform to. Either this property or {@link #getType() type} should be set.
//      *
//      * @param ref the new ref.
//      */
//     public void setRef(final String ref) {
//         this.ref = ref;
//     }
// 
//     /**
//      * Sets the type of the items. Either this property or {@link #getRef() ref} should be set.
//      *
//      * @param type the new type.
//      */
//     public void setType(final FieldType type) {
//         this.type = type;
//     }
// }
// 
// Path: src/com/github/tinselspoon/intellij/kubernetes/model/FieldType.java
// public enum FieldType {
// 
//     /** An integer property data type. */
//     @SerializedName("integer")
//     INTEGER,
// 
//     /** A number property data type (i.e. may have a decimal point). */
//     @SerializedName("number")
//     NUMBER,
// 
//     /** A string property data type. */
//     @SerializedName("string")
//     STRING,
// 
//     /** A boolean property data type. */
//     @SerializedName("boolean")
//     BOOLEAN,
// 
//     /** An array property data type. */
//     @SerializedName("array")
//     ARRAY,
// 
//     /** An unstructured object property data type. */
//     @SerializedName("object")
//     OBJECT;
// 
//     @Override
//     public String toString() {
//         return name().toLowerCase();
//     }
// }
// 
// Path: src/com/github/tinselspoon/intellij/kubernetes/model/Property.java
// public class Property {
// 
//     /** A description of this property. */
//     private String description;
// 
//     /** For properties that are arrays, describes the items that may appear in the array ({@code null} otherwise). */
//     private ArrayItems items;
// 
//     /** The model ID which describes the possible child properties of this property, or {@code null} if not applicable. */
//     @SerializedName("$ref")
//     private String ref;
// 
//     /** The type of this property. Should not be set if {@link #getRef() ref} is populated. */
//     private FieldType type;
// 
//     /**
//      * Gets a description of this property.
//      *
//      * @return the description.
//      */
//     public String getDescription() {
//         return description;
//     }
// 
//     /**
//      * Gets for properties that are arrays, describes the items that may appear in the array ({@code null} otherwise).
//      *
//      * @return the items.
//      */
//     public ArrayItems getItems() {
//         return items;
//     }
// 
//     /**
//      * Gets the model ID which describes the possible child properties of this property, or {@code null} if not applicable.
//      *
//      * @return the ref.
//      */
//     public String getRef() {
//         return ref;
//     }
// 
//     /**
//      * Gets the type of this property. Should not be set if {@link #getRef() ref} is populated.
//      *
//      * @return the type.
//      */
//     public FieldType getType() {
//         return type;
//     }
// 
//     /**
//      * Sets a description of this property.
//      *
//      * @param description the new description.
//      */
//     public void setDescription(final String description) {
//         this.description = description;
//     }
// 
//     /**
//      * Sets for properties that are arrays, describes the items that may appear in the array ({@code null} otherwise).
//      *
//      * @param items the new items.
//      */
//     public void setItems(final ArrayItems items) {
//         this.items = items;
//     }
// 
//     /**
//      * Sets the model ID which describes the possible child properties of this property, or {@code null} if not applicable.
//      *
//      * @param ref the new ref.
//      */
//     public void setRef(final String ref) {
//         this.ref = ref;
//     }
// 
//     /**
//      * Sets the type of this property. Should not be set if {@link #getRef() ref} is populated.
//      *
//      * @param type the new type.
//      */
//     public void setType(final FieldType type) {
//         this.type = type;
//     }
// }


// Path: src/com/github/tinselspoon/intellij/kubernetes/ModelUtil.java
import java.util.Objects;
import org.jetbrains.annotations.NotNull;
import com.github.tinselspoon.intellij.kubernetes.model.ArrayItems;
import com.github.tinselspoon.intellij.kubernetes.model.FieldType;
import com.github.tinselspoon.intellij.kubernetes.model.Property;

package com.github.tinselspoon.intellij.kubernetes;




/**
 * Utilities for working with model classes.
 */
final class ModelUtil {

    /** Static class private constructor. */
    private ModelUtil() {
    }

    /**
     * Get a string that describes the type of a particular property.
     * <p>
     * If the property is a basic type (string, integer etc) then the type name is returned. If the property type refers to a model, the model name is returned. If the property is an array, then the
     * process described previously is carried out for the array item type, and the string "[]" is appended to the end.
     *
     * @param propertySpec the property to obtain the type string for.
     * @return the type string.
     */
    @NotNull
    static String typeStringFor(@NotNull final Property propertySpec) {
        final String typeText;