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

package com.azure.resourcemanager.operationsmanagement.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** ManagementAssociation properties supported by the OperationsManagement resource provider. */
@Fluent
public final class ManagementAssociationProperties {
    /*
     * The applicationId of the appliance for this association.
     */
    @JsonProperty(value = "applicationId", required = true)
    private String applicationId;

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

    /**
     * Get the applicationId property: The applicationId of the appliance for this association.
     *
     * @return the applicationId value.
     */
    public String applicationId() {
        return this.applicationId;
    }

    /**
     * Set the applicationId property: The applicationId of the appliance for this association.
     *
     * @param applicationId the applicationId value to set.
     * @return the ManagementAssociationProperties object itself.
     */
    public ManagementAssociationProperties withApplicationId(String applicationId) {
        this.applicationId = applicationId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (applicationId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property applicationId in model ManagementAssociationProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ManagementAssociationProperties.class);
}
