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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.servicenetworking.models.AssociationSubnetUpdate;
import com.azure.resourcemanager.servicenetworking.models.AssociationType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The updatable properties of the Association. */
@Fluent
public final class AssociationUpdateProperties {
    /*
     * Association Type
     */
    @JsonProperty(value = "associationType")
    private AssociationType associationType;

    /*
     * Association Subnet
     */
    @JsonProperty(value = "subnet")
    private AssociationSubnetUpdate subnet;

    /** Creates an instance of AssociationUpdateProperties class. */
    public AssociationUpdateProperties() {
    }

    /**
     * Get the associationType property: Association Type.
     *
     * @return the associationType value.
     */
    public AssociationType associationType() {
        return this.associationType;
    }

    /**
     * Set the associationType property: Association Type.
     *
     * @param associationType the associationType value to set.
     * @return the AssociationUpdateProperties object itself.
     */
    public AssociationUpdateProperties withAssociationType(AssociationType associationType) {
        this.associationType = associationType;
        return this;
    }

    /**
     * Get the subnet property: Association Subnet.
     *
     * @return the subnet value.
     */
    public AssociationSubnetUpdate subnet() {
        return this.subnet;
    }

    /**
     * Set the subnet property: Association Subnet.
     *
     * @param subnet the subnet value to set.
     * @return the AssociationUpdateProperties object itself.
     */
    public AssociationUpdateProperties withSubnet(AssociationSubnetUpdate subnet) {
        this.subnet = subnet;
        return this;
    }

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