---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.15.0
  name: keycloakrealmgroups.v1.edp.epam.com
spec:
  group: v1.edp.epam.com
  names:
    kind: KeycloakRealmGroup
    listKind: KeycloakRealmGroupList
    plural: keycloakrealmgroups
    singular: keycloakrealmgroup
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Reconcilation status
      jsonPath: .status.value
      name: Status
      type: string
    name: v1
    schema:
      openAPIV3Schema:
        description: KeycloakRealmGroup is the Schema for the keycloak group 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: KeycloakRealmGroupSpec defines the desired state of KeycloakRealmGroup.
            properties:
              access:
                additionalProperties:
                  type: boolean
                description: Access is a map of group access.
                nullable: true
                type: object
              attributes:
                additionalProperties:
                  items:
                    type: string
                  type: array
                description: Attributes is a map of group attributes.
                nullable: true
                type: object
              clientRoles:
                description: ClientRoles is a list of client roles assigned to group.
                items:
                  properties:
                    clientId:
                      description: ClientID is a client ID.
                      type: string
                    roles:
                      description: Roles is a list of client roles names assigned
                        to service account.
                      items:
                        type: string
                      nullable: true
                      type: array
                  required:
                  - clientId
                  type: object
                nullable: true
                type: array
              name:
                description: Name of keycloak group.
                type: string
              path:
                description: Path is a group path.
                type: string
              realm:
                description: |-
                  Deprecated: use RealmRef instead.
                  Realm is name of KeycloakRealm custom resource.
                type: string
              realmRef:
                description: RealmRef is reference to Realm custom resource.
                properties:
                  kind:
                    description: Kind specifies the kind of the Keycloak resource.
                    enum:
                    - KeycloakRealm
                    - ClusterKeycloakRealm
                    type: string
                  name:
                    description: Name specifies the name of the Keycloak resource.
                    type: string
                type: object
              realmRoles:
                description: RealmRoles is a list of realm roles assigned to group.
                items:
                  type: string
                nullable: true
                type: array
              subGroups:
                description: SubGroups is a list of subgroups assigned to group.
                items:
                  type: string
                nullable: true
                type: array
            required:
            - name
            type: object
          status:
            description: KeycloakRealmGroupStatus defines the observed state of KeycloakRealmGroup.
            properties:
              failureCount:
                format: int64
                type: integer
              id:
                description: ID is a group ID.
                type: string
              value:
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
