// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.containerservice.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.SubResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.containerservice.models.AgentPoolMode;
import com.azure.resourcemanager.containerservice.models.AgentPoolType;
import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings;
import com.azure.resourcemanager.containerservice.models.ContainerServiceVMSizeTypes;
import com.azure.resourcemanager.containerservice.models.KubeletConfig;
import com.azure.resourcemanager.containerservice.models.LinuxOSConfig;
import com.azure.resourcemanager.containerservice.models.OSDiskType;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.PowerState;
import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy;
import com.azure.resourcemanager.containerservice.models.ScaleSetPriority;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Agent Pool. */
@Fluent
public final class AgentPoolInner extends SubResource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolInner.class);

    /*
     * Properties of an agent pool.
     */
    @JsonProperty(value = "properties")
    private ManagedClusterAgentPoolProfileProperties innerProperties;

    /*
     * The name of the resource that is unique within a resource group. This
     * name can be used to access the resource.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Resource type
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private String type;

    /**
     * Get the innerProperties property: Properties of an agent pool.
     *
     * @return the innerProperties value.
     */
    private ManagedClusterAgentPoolProfileProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the name property: The name of the resource that is unique within a resource group. This name can be used to
     * access the resource.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the type property: Resource type.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /** {@inheritDoc} */
    @Override
    public AgentPoolInner withId(String id) {
        super.withId(id);
        return this;
    }

    /**
     * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of
     * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value
     * is 1.
     *
     * @return the count value.
     */
    public Integer count() {
        return this.innerProperties() == null ? null : this.innerProperties().count();
    }

    /**
     * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of
     * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value
     * is 1.
     *
     * @param count the count value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withCount(Integer count) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withCount(count);
        return this;
    }

    /**
     * Get the vmSize property: Size of agent VMs.
     *
     * @return the vmSize value.
     */
    public ContainerServiceVMSizeTypes vmSize() {
        return this.innerProperties() == null ? null : this.innerProperties().vmSize();
    }

    /**
     * Set the vmSize property: Size of agent VMs.
     *
     * @param vmSize the vmSize value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withVmSize(ContainerServiceVMSizeTypes vmSize) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withVmSize(vmSize);
        return this;
    }

    /**
     * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in this
     * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
     *
     * @return the osDiskSizeGB value.
     */
    public Integer osDiskSizeGB() {
        return this.innerProperties() == null ? null : this.innerProperties().osDiskSizeGB();
    }

    /**
     * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in this
     * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
     *
     * @param osDiskSizeGB the osDiskSizeGB value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withOsDiskSizeGB(Integer osDiskSizeGB) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withOsDiskSizeGB(osDiskSizeGB);
        return this;
    }

    /**
     * Get the osDiskType property: OS disk type to be used for machines in a given agent pool. Allowed values are
     * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a
     * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after
     * creation.
     *
     * @return the osDiskType value.
     */
    public OSDiskType osDiskType() {
        return this.innerProperties() == null ? null : this.innerProperties().osDiskType();
    }

    /**
     * Set the osDiskType property: OS disk type to be used for machines in a given agent pool. Allowed values are
     * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a
     * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after
     * creation.
     *
     * @param osDiskType the osDiskType value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withOsDiskType(OSDiskType osDiskType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withOsDiskType(osDiskType);
        return this;
    }

    /**
     * Get the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods.
     *
     * @return the vnetSubnetId value.
     */
    public String vnetSubnetId() {
        return this.innerProperties() == null ? null : this.innerProperties().vnetSubnetId();
    }

    /**
     * Set the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods.
     *
     * @param vnetSubnetId the vnetSubnetId value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withVnetSubnetId(String vnetSubnetId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withVnetSubnetId(vnetSubnetId);
        return this;
    }

    /**
     * Get the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods.
     *
     * @return the podSubnetId value.
     */
    public String podSubnetId() {
        return this.innerProperties() == null ? null : this.innerProperties().podSubnetId();
    }

    /**
     * Set the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods.
     *
     * @param podSubnetId the podSubnetId value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withPodSubnetId(String podSubnetId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withPodSubnetId(podSubnetId);
        return this;
    }

    /**
     * Get the maxPods property: Maximum number of pods that can run on a node.
     *
     * @return the maxPods value.
     */
    public Integer maxPods() {
        return this.innerProperties() == null ? null : this.innerProperties().maxPods();
    }

    /**
     * Set the maxPods property: Maximum number of pods that can run on a node.
     *
     * @param maxPods the maxPods value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withMaxPods(Integer maxPods) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withMaxPods(maxPods);
        return this;
    }

    /**
     * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.
     *
     * @return the osType value.
     */
    public OSType osType() {
        return this.innerProperties() == null ? null : this.innerProperties().osType();
    }

    /**
     * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.
     *
     * @param osType the osType value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withOsType(OSType osType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withOsType(osType);
        return this;
    }

    /**
     * Get the maxCount property: Maximum number of nodes for auto-scaling.
     *
     * @return the maxCount value.
     */
    public Integer maxCount() {
        return this.innerProperties() == null ? null : this.innerProperties().maxCount();
    }

    /**
     * Set the maxCount property: Maximum number of nodes for auto-scaling.
     *
     * @param maxCount the maxCount value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withMaxCount(Integer maxCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withMaxCount(maxCount);
        return this;
    }

    /**
     * Get the minCount property: Minimum number of nodes for auto-scaling.
     *
     * @return the minCount value.
     */
    public Integer minCount() {
        return this.innerProperties() == null ? null : this.innerProperties().minCount();
    }

    /**
     * Set the minCount property: Minimum number of nodes for auto-scaling.
     *
     * @param minCount the minCount value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withMinCount(Integer minCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withMinCount(minCount);
        return this;
    }

    /**
     * Get the enableAutoScaling property: Whether to enable auto-scaler.
     *
     * @return the enableAutoScaling value.
     */
    public Boolean enableAutoScaling() {
        return this.innerProperties() == null ? null : this.innerProperties().enableAutoScaling();
    }

    /**
     * Set the enableAutoScaling property: Whether to enable auto-scaler.
     *
     * @param enableAutoScaling the enableAutoScaling value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withEnableAutoScaling(Boolean enableAutoScaling) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withEnableAutoScaling(enableAutoScaling);
        return this;
    }

    /**
     * Get the type property: AgentPoolType represents types of an agent pool.
     *
     * @return the type value.
     */
    public AgentPoolType typePropertiesType() {
        return this.innerProperties() == null ? null : this.innerProperties().type();
    }

    /**
     * Set the type property: AgentPoolType represents types of an agent pool.
     *
     * @param type the type value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withTypePropertiesType(AgentPoolType type) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withType(type);
        return this;
    }

    /**
     * Get the mode property: AgentPoolMode represents mode of an agent pool.
     *
     * @return the mode value.
     */
    public AgentPoolMode mode() {
        return this.innerProperties() == null ? null : this.innerProperties().mode();
    }

    /**
     * Set the mode property: AgentPoolMode represents mode of an agent pool.
     *
     * @param mode the mode value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withMode(AgentPoolMode mode) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withMode(mode);
        return this;
    }

    /**
     * Get the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster.
     *
     * @return the orchestratorVersion value.
     */
    public String orchestratorVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().orchestratorVersion();
    }

    /**
     * Set the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster.
     *
     * @param orchestratorVersion the orchestratorVersion value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withOrchestratorVersion(orchestratorVersion);
        return this;
    }

    /**
     * Get the nodeImageVersion property: Version of node image.
     *
     * @return the nodeImageVersion value.
     */
    public String nodeImageVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion();
    }

    /**
     * Get the upgradeSettings property: Settings for upgrading the agentpool.
     *
     * @return the upgradeSettings value.
     */
    public AgentPoolUpgradeSettings upgradeSettings() {
        return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings();
    }

    /**
     * Set the upgradeSettings property: Settings for upgrading the agentpool.
     *
     * @param upgradeSettings the upgradeSettings value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withUpgradeSettings(upgradeSettings);
        return this;
    }

    /**
     * Get the provisioningState property: The current deployment or provisioning state, which only appears in the
     * response.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the powerState property: Describes whether the Agent Pool is Running or Stopped.
     *
     * @return the powerState value.
     */
    public PowerState powerState() {
        return this.innerProperties() == null ? null : this.innerProperties().powerState();
    }

    /**
     * Get the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
     *
     * @return the availabilityZones value.
     */
    public List<String> availabilityZones() {
        return this.innerProperties() == null ? null : this.innerProperties().availabilityZones();
    }

    /**
     * Set the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
     *
     * @param availabilityZones the availabilityZones value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withAvailabilityZones(List<String> availabilityZones) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withAvailabilityZones(availabilityZones);
        return this;
    }

    /**
     * Get the enableNodePublicIp property: Enable public IP for nodes.
     *
     * @return the enableNodePublicIp value.
     */
    public Boolean enableNodePublicIp() {
        return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIp();
    }

    /**
     * Set the enableNodePublicIp property: Enable public IP for nodes.
     *
     * @param enableNodePublicIp the enableNodePublicIp value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withEnableNodePublicIp(Boolean enableNodePublicIp) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withEnableNodePublicIp(enableNodePublicIp);
        return this;
    }

    /**
     * Get the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority.
     * Default to regular.
     *
     * @return the scaleSetPriority value.
     */
    public ScaleSetPriority scaleSetPriority() {
        return this.innerProperties() == null ? null : this.innerProperties().scaleSetPriority();
    }

    /**
     * Set the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority.
     * Default to regular.
     *
     * @param scaleSetPriority the scaleSetPriority value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withScaleSetPriority(scaleSetPriority);
        return this;
    }

    /**
     * Get the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot
     * virtual machine scale set. Default to Delete.
     *
     * @return the scaleSetEvictionPolicy value.
     */
    public ScaleSetEvictionPolicy scaleSetEvictionPolicy() {
        return this.innerProperties() == null ? null : this.innerProperties().scaleSetEvictionPolicy();
    }

    /**
     * Set the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot
     * virtual machine scale set. Default to Delete.
     *
     * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withScaleSetEvictionPolicy(scaleSetEvictionPolicy);
        return this;
    }

    /**
     * Get the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US
     * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to
     * on-demand.
     *
     * @return the spotMaxPrice value.
     */
    public Float spotMaxPrice() {
        return this.innerProperties() == null ? null : this.innerProperties().spotMaxPrice();
    }

    /**
     * Set the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US
     * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to
     * on-demand.
     *
     * @param spotMaxPrice the spotMaxPrice value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withSpotMaxPrice(Float spotMaxPrice) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withSpotMaxPrice(spotMaxPrice);
        return this;
    }

    /**
     * Get the tags property: Agent pool tags to be persisted on the agent pool virtual machine scale set.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.innerProperties() == null ? null : this.innerProperties().tags();
    }

    /**
     * Set the tags property: Agent pool tags to be persisted on the agent pool virtual machine scale set.
     *
     * @param tags the tags value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withTags(Map<String, String> tags) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withTags(tags);
        return this;
    }

    /**
     * Get the nodeLabels property: Agent pool node labels to be persisted across all nodes in agent pool.
     *
     * @return the nodeLabels value.
     */
    public Map<String, String> nodeLabels() {
        return this.innerProperties() == null ? null : this.innerProperties().nodeLabels();
    }

    /**
     * Set the nodeLabels property: Agent pool node labels to be persisted across all nodes in agent pool.
     *
     * @param nodeLabels the nodeLabels value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withNodeLabels(Map<String, String> nodeLabels) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withNodeLabels(nodeLabels);
        return this;
    }

    /**
     * Get the nodeTaints property: Taints added to new nodes during node pool create and scale. For example,
     * key=value:NoSchedule.
     *
     * @return the nodeTaints value.
     */
    public List<String> nodeTaints() {
        return this.innerProperties() == null ? null : this.innerProperties().nodeTaints();
    }

    /**
     * Set the nodeTaints property: Taints added to new nodes during node pool create and scale. For example,
     * key=value:NoSchedule.
     *
     * @param nodeTaints the nodeTaints value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withNodeTaints(List<String> nodeTaints) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withNodeTaints(nodeTaints);
        return this;
    }

    /**
     * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group.
     *
     * @return the proximityPlacementGroupId value.
     */
    public String proximityPlacementGroupId() {
        return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroupId();
    }

    /**
     * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group.
     *
     * @param proximityPlacementGroupId the proximityPlacementGroupId value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withProximityPlacementGroupId(String proximityPlacementGroupId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withProximityPlacementGroupId(proximityPlacementGroupId);
        return this;
    }

    /**
     * Get the kubeletConfig property: KubeletConfig specifies the configuration of kubelet on agent nodes.
     *
     * @return the kubeletConfig value.
     */
    public KubeletConfig kubeletConfig() {
        return this.innerProperties() == null ? null : this.innerProperties().kubeletConfig();
    }

    /**
     * Set the kubeletConfig property: KubeletConfig specifies the configuration of kubelet on agent nodes.
     *
     * @param kubeletConfig the kubeletConfig value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withKubeletConfig(KubeletConfig kubeletConfig) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withKubeletConfig(kubeletConfig);
        return this;
    }

    /**
     * Get the linuxOSConfig property: LinuxOSConfig specifies the OS configuration of linux agent nodes.
     *
     * @return the linuxOSConfig value.
     */
    public LinuxOSConfig linuxOSConfig() {
        return this.innerProperties() == null ? null : this.innerProperties().linuxOSConfig();
    }

    /**
     * Set the linuxOSConfig property: LinuxOSConfig specifies the OS configuration of linux agent nodes.
     *
     * @param linuxOSConfig the linuxOSConfig value to set.
     * @return the AgentPoolInner object itself.
     */
    public AgentPoolInner withLinuxOSConfig(LinuxOSConfig linuxOSConfig) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ManagedClusterAgentPoolProfileProperties();
        }
        this.innerProperties().withLinuxOSConfig(linuxOSConfig);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}
