{
  "description": "ManagedKafkaTopic is the Schema for the ManagedKafkaTopic API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ManagedKafkaTopicSpec defines the desired state of ManagedKafkaTopic",
      "properties": {
        "clusterRef": {
          "description": "Required. Reference to the Kafka cluster to create the topic in.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed ManagedKafkaCluster resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/clusters/{{clusterID}}\".",
              "type": "string"
            },
            "name": {
              "description": "The name of a ManagedKafkaCluster resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a ManagedKafkaCluster resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "configs": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.",
          "type": "object"
        },
        "location": {
          "description": "Required. the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.",
          "type": "string"
        },
        "partitionCount": {
          "description": "Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.",
          "format": "int32",
          "type": "integer"
        },
        "projectRef": {
          "description": "The Project that this resource belongs to.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The `projectID` field of a project, when not managed by Config Connector.",
              "type": "string"
            },
            "kind": {
              "description": "The kind of the Project resource; optional but must be `Project` if provided.",
              "type": "string"
            },
            "name": {
              "description": "The `name` field of a `Project` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` field of a `Project` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "replicationFactor": {
          "description": "Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.",
          "format": "int32",
          "type": "integer"
        },
        "resourceID": {
          "description": "The GCP resource identifier. If not given, the metadata.name will be used.",
          "type": "string"
        }
      },
      "required": [
        "clusterRef",
        "location",
        "partitionCount",
        "projectRef",
        "replicationFactor"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ManagedKafkaTopicStatus defines the config connector machine state of ManagedKafkaTopic",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the object's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition. Can be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "externalRef": {
          "description": "A unique specifier for the ManagedKafkaTopic resource in GCP.",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
