{
  "description": "A flexcluster, managed by the MongoDB Kubernetes Atlas Operator.",
  "properties": {
    "spec": {
      "description": "Specification of the flexcluster supporting the following versions:\n\n- v20250312\n\nAt most one versioned spec can be specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
      "properties": {
        "connectionSecretRef": {
          "description": "SENSITIVE FIELD\n\nReference to a secret containing the credentials to setup the connection to Atlas.",
          "properties": {
            "name": {
              "description": "Name of the secret containing the Atlas credentials.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "v20250312": {
          "description": "The spec of the flexcluster resource for version v20250312.",
          "properties": {
            "entry": {
              "description": "The entry fields of the flexcluster resource spec. These fields can be set for creating and updating flexclusters.",
              "properties": {
                "name": {
                  "description": "Human-readable label that identifies the instance.",
                  "type": "string"
                },
                "providerSettings": {
                  "description": "Group of cloud provider settings that configure the provisioned MongoDB flex cluster.",
                  "properties": {
                    "backingProviderName": {
                      "description": "Cloud service provider on which MongoDB Cloud provisioned the flex cluster.",
                      "type": "string"
                    },
                    "regionName": {
                      "description": "Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/).",
                      "type": "string"
                    }
                  },
                  "required": [
                    "backingProviderName",
                    "regionName"
                  ],
                  "title": "Cloud Service Provider Settings for a Flex Cluster",
                  "type": "object",
                  "additionalProperties": false
                },
                "tags": {
                  "description": "List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.",
                  "items": {
                    "description": "Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, `environment : production`.",
                    "properties": {
                      "key": {
                        "description": "Constant that defines the set of the tag. For example, `environment` in the `environment : production` tag.",
                        "type": "string"
                      },
                      "value": {
                        "description": "Variable that belongs to the set of the tag. For example, `production` in the `environment : production` tag.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "value"
                    ],
                    "title": "Resource Tag",
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "terminationProtectionEnabled": {
                  "description": "Flag that indicates whether termination protection is enabled on the cluster. If set to `true`, MongoDB Cloud won't delete the cluster. If set to `false`, MongoDB Cloud will delete the cluster.",
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "providerSettings"
              ],
              "title": "Flex Cluster Description Create",
              "type": "object",
              "additionalProperties": false
            },
            "groupId": {
              "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.",
              "example": "32b6e34b3d91647abb20e7b8",
              "type": "string",
              "x-kubernetes-validations": [
                {
                  "message": "groupId cannot be modified after creation",
                  "rule": "self == oldSelf"
                }
              ]
            },
            "groupRef": {
              "description": "A reference to a \"Group\" resource.\nThe value of \"$.status.v20250312.id\" will be used to set \"groupId\".\nMutually exclusive with the \"groupId\" property.",
              "properties": {
                "name": {
                  "description": "Name of the \"Group\" resource.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "groupId and groupRef are mutually exclusive; only one of them can be set",
              "rule": "(has(self.groupId) && !has(self.groupRef)) || (!has(self.groupId) && has(self.groupRef))"
            }
          ],
          "additionalProperties": false
        }
      },
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "spec.connectionSecretRef must be set if spec.v20250312.groupId is set.",
          "rule": "(has(self.v20250312.groupId) && has(self.connectionSecretRef)) || (!has(self.v20250312.groupId))"
        }
      ],
      "additionalProperties": false
    },
    "status": {
      "description": "Most recently observed read-only status of the flexcluster for the specified resource version. This data may not be up to date and is populated by the system. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
      "properties": {
        "conditions": {
          "description": "Represents the latest available observations of a resource's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.",
                "type": "integer"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of condition.",
                "type": "string"
              }
            },
            "required": [
              "type",
              "status"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "v20250312": {
          "description": "The last observed Atlas state of the flexcluster resource for version v20250312.",
          "properties": {
            "backupSettings": {
              "description": "Flex backup configuration.",
              "properties": {
                "enabled": {
                  "description": "Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.",
                  "type": "boolean"
                }
              },
              "title": "Flex Backup Configuration",
              "type": "object",
              "additionalProperties": false
            },
            "clusterType": {
              "description": "Flex cluster topology.",
              "type": "string"
            },
            "connectionStrings": {
              "description": "Collection of Uniform Resource Locators that point to the MongoDB database.",
              "properties": {
                "standard": {
                  "description": "Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb://` protocol.",
                  "type": "string"
                },
                "standardSrv": {
                  "description": "Public connection string that you can use to connect to this flex cluster. This connection string uses the `mongodb+srv://` protocol.",
                  "type": "string"
                }
              },
              "title": "Flex Cluster Connection Strings",
              "type": "object",
              "additionalProperties": false
            },
            "createDate": {
              "description": "Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.",
              "type": "string"
            },
            "groupId": {
              "description": "Unique 24-hexadecimal character string that identifies the project.",
              "example": "32b6e34b3d91647abb20e7b8",
              "type": "string"
            },
            "id": {
              "description": "Unique 24-hexadecimal digit string that identifies the instance.",
              "example": "32b6e34b3d91647abb20e7b8",
              "type": "string"
            },
            "mongoDBVersion": {
              "description": "Version of MongoDB that the instance runs.",
              "type": "string"
            },
            "name": {
              "description": "Human-readable label that identifies the instance.",
              "type": "string"
            },
            "providerSettings": {
              "description": "Group of cloud provider settings that configure the provisioned MongoDB flex cluster.",
              "properties": {
                "backingProviderName": {
                  "description": "Cloud service provider on which MongoDB Cloud provisioned the flex cluster.",
                  "type": "string"
                },
                "diskSizeGB": {
                  "description": "Storage capacity available to the flex cluster expressed in gigabytes.",
                  "type": "number"
                },
                "providerName": {
                  "description": "Human-readable label that identifies the provider type.",
                  "type": "string"
                },
                "regionName": {
                  "description": "Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/).",
                  "type": "string"
                }
              },
              "title": "Cloud Service Provider Settings for a Flex Cluster",
              "type": "object",
              "additionalProperties": false
            },
            "stateName": {
              "description": "Human-readable label that indicates any current activity being taken on this cluster by the Atlas control plane. With the exception of CREATING and DELETING states, clusters should always be available and have a Primary node even when in states indicating ongoing activity.\n\n - `IDLE`: Atlas is making no changes to this cluster and all changes requested via the UI or API can be assumed to have been applied.\n - `CREATING`: A cluster being provisioned for the very first time returns state CREATING until it is ready for connections. Ensure IP Access List and DB Users are configured before attempting to connect.\n - `UPDATING`: A change requested via the UI, API, AutoScaling, or other scheduled activity is taking place.\n - `DELETING`: The cluster is in the process of deletion and will soon be deleted.\n - `REPAIRING`: One or more nodes in the cluster are being returned to service by the Atlas control plane. Other nodes should continue to provide service as normal.",
              "type": "string"
            },
            "versionReleaseSystem": {
              "description": "Method by which the cluster maintains the MongoDB versions.",
              "type": "string"
            }
          },
          "required": [
            "providerSettings"
          ],
          "title": "Flex Cluster Description",
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
