- release_tracks: [ALPHA, GA]

  help_text:
    brief: Create a telco automation orchestration cluster.
    description: |
      Create a new telco automation orchestration cluster.
    examples: |
      To create an orchestration cluster called `test-orchestrationCluster` in location `us-central1`, run:

        $ {command} test-orchestrationCluster --location=us-central1

  request:
    collection: telcoautomation.projects.locations.orchestrationClusters
    ALPHA:
      api_version: v1alpha1
    GA:
      api_version: v1
    modify_request_hooks:
    - googlecloudsdk.command_lib.telco_automation.hooks:UpdateRequestWithInput

  arguments:
    resource:
      help_text: Telco automation orchestration cluster to create.
      spec: !REF googlecloudsdk.command_lib.telco_automation.resources:orchestrationCluster
    params:
    - group:
        params:
        - arg_name: network
          api_field: orchestrationCluster.managementConfig.standardManagementConfig.network
          help_text: Name of the VPC Network to put the GKE cluster and nodes in. The VPC will be created if it doesn't exist.
          required: true
        - arg_name: subnet
          api_field: orchestrationCluster.managementConfig.standardManagementConfig.subnet
          help_text: Specifies the subnet that the interface will be part of. Network key must be specified and the subnet must be a subnetwork of the specified network.
    - api_field: orchestrationCluster.managementConfig.standardManagementConfig.masterIpv4CidrBlock
      arg_name: master-ipv4-cidr-block
      help_text: /28 network that the control plane will use.
    - api_field: orchestrationCluster.managementConfig.standardManagementConfig.clusterCidrBlock
      arg_name: cluster-cidr-block
      help_text: IP address range for the cluster pod IPs. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use.
    - api_field: orchestrationCluster.managementConfig.standardManagementConfig.servicesCidrBlock
      arg_name: services-cidr-block
      help_text: IP address range for the cluster service IPs. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use.
    - api_field: orchestrationCluster.managementConfig.standardManagementConfig.clusterNamedRange
      arg_name: cluster-named-range
      help_text: Name of the existing secondary range in the cluster's subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block can be used to automatically create a GKE-managed one.
    - api_field: orchestrationCluster.managementConfig.standardManagementConfig.servicesNamedRange
      arg_name: services-named-range
      help_text: Name of the existing secondary range in the cluster's subnetwork to use for service ClusterIPs. Alternatively, services_cidr_block can be used to automatically create a GKE-managed one.
    - arg_name: full-management-config
      type: bool
      help_text: This parameter is to marked true only if the management configuration arguments which are provided, belong to full (Autopilot) cluster management.
    - api_field:  orchestrationCluster.managementConfig.standardManagementConfig.masterAuthorizedNetworksConfig.cidrBlocks
      arg_name: cidr-blocks
      help_text: Master Authorized Network that supports multiple CIDR blocks. Allows access to the k8s master from multiple blocks.
      type:
        arg_dict:
          flatten: false
          spec:
          - api_field: displayName
            arg_name: display-name
          - api_field: cidrBlock
            arg_name: cidr-block

  async:
    collection: telcoautomation.projects.locations.operations
