{
  "description": "User is a postgresql user.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "azureName": {
          "description": "AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it\ndoesn't have to be.",
          "type": "string"
        },
        "localUser": {
          "description": "LocalUser contains details for creating a standard (non-aad) postgresql User.",
          "properties": {
            "password": {
              "description": "Password is the password to use for the user",
              "properties": {
                "key": {
                  "description": "Key is the key in the Kubernetes secret being referenced",
                  "type": "string"
                },
                "name": {
                  "description": "Name is the name of the Kubernetes secret being referenced.\nThe secret must be in the same namespace as the resource",
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "serverAdminPassword": {
              "description": "ServerAdminPassword is a reference to a secret containing the servers administrator password",
              "properties": {
                "key": {
                  "description": "Key is the key in the Kubernetes secret being referenced",
                  "type": "string"
                },
                "name": {
                  "description": "Name is the name of the Kubernetes secret being referenced.\nThe secret must be in the same namespace as the resource",
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "serverAdminUsername": {
              "description": "ServerAdminUsername is the user name of the Server administrator",
              "type": "string"
            }
          },
          "required": [
            "password",
            "serverAdminPassword",
            "serverAdminUsername"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "owner": {
          "description": "Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also\ncontrols the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a\nreference to a dbforpostgresql.azure.com/FlexibleServer resource",
          "properties": {
            "name": {
              "description": "This is the name of the Kubernetes resource to reference.",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "roleOptions": {
          "default": {
            "login": true
          },
          "description": "RoleOptions defines additional attributes of the user role. You can read more about these attributes\nat https://www.postgresql.org/docs/current/role-attributes.html.",
          "properties": {
            "createDb": {
              "default": false,
              "description": "WITH CREATEDB or NOCREATEDB",
              "type": "boolean"
            },
            "createRole": {
              "default": false,
              "description": "WITH CREATEROLE or NOCREATEROLE",
              "type": "boolean"
            },
            "login": {
              "default": true,
              "description": "WITH LOGIN or NOLOGIN",
              "type": "boolean"
            },
            "replication": {
              "default": false,
              "description": "WITH REPLICATION or NOREPLICATION",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "roles": {
          "description": "Roles is the set of roles granted to the user upon creation.\nThe Azure Database for PostgreSQL server is created with 3 default roles defined: azure_pg_admin, azure_superuser,\nand your server admin user (this last is a role w/ login permission, commonly called a User).",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "localUser",
        "owner"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "conditions": {
          "description": "Conditions: The observed state of the resource",
          "items": {
            "description": "Condition defines an extension to status (an observation) of a resource",
            "properties": {
              "lastTransitionTime": {
                "description": "LastTransitionTime is the last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "Message is a human readable message indicating details about the transition. This field may be empty.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "ObservedGeneration is the .metadata.generation that the condition was set based upon. For instance, if\n.metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "description": "Reason for the condition's last transition.\nReasons are upper CamelCase (PascalCase) with no spaces. A reason is always provided, this field will not be empty.",
                "type": "string"
              },
              "severity": {
                "description": "Severity with which to treat failures of this type of condition.\nFor conditions which have positive polarity (Status == True is their normal/healthy state), this will be omitted when Status == True\nFor conditions which have negative polarity (Status == False is their normal/healthy state), this will be omitted when Status == False.\nThis is omitted in all cases when Status == Unknown",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, or Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of condition.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
