- release_tracks: [ALPHA]

  help_text:
    brief: Create an Edge Container cluster.
    description: |
      Create an Edge Container cluster.
    # TODO(b/176452774) Fill in the example command for all methods and resources.
    examples: |
      To create a cluster called 'my-cluster', run:

        $ {command} my-cluster

  request:
    collection: edgecontainer.projects.locations.clusters
    api_version: v1alpha
    modify_request_hooks:
    - googlecloudsdk.command_lib.edge_container.hub:SetHubMembershipPath
    - googlecloudsdk.command_lib.edge_container.admin_users:SetAdminUsers

  arguments:
    resource:
      help_text: Edge Container cluster to create.
      spec: !REF googlecloudsdk.command_lib.edge_container.resources:cluster

    params:
    - arg_name: default-max-pods-per-node
      api_field: cluster.defaultMaxPodsPerNode
      help_text: |
        The default maximum number of pods per node.
    - arg_name: hub-membership
      api_field: cluster.hub.membership
      help_text: |
        Name of the membership resource to use when registering this cluster
        with GKE Hub.
      required: true
    - arg_name: cluster-ipv4-cidr
      api_field: cluster.networking.clusterIpv4CidrBlocks
      repeated: false
      help_text: |
        All pods in the cluster are assigned an RFC1918 IPv4 address from
        this block. This field cannot be changed after creation.
      default: "10.0.0.0/17"
    - arg_name: services-ipv4-cidr
      api_field: cluster.networking.servicesIpv4CidrBlocks
      repeated: false
      help_text: |
        All services in the cluster are assigned an RFC1918 IPv4 address from this
        block. This field cannot be changed after creation.
      default: "10.96.0.0/12"
    - arg_name: admin-users
      api_field: cluster.authorization.adminUsers.username
      repeated: false
      help_text: |
        Username (Google email address) of the user who should be granted
        cluster-admin initially. This currently supports exactly one admin. If not
        set, the account issuing the creation request will be used by default.

    labels:
      api_field: cluster.labels

  async:
    collection: edgecontainer.projects.locations.operations
