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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** InMageRcm appliance details. */
@Immutable
public final class InMageRcmApplianceDetails {
    /*
     * The appliance Id.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * The appliance name.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The fabric ARM Id.
     */
    @JsonProperty(value = "fabricArmId", access = JsonProperty.Access.WRITE_ONLY)
    private String fabricArmId;

    /*
     * The process server.
     */
    @JsonProperty(value = "processServer", access = JsonProperty.Access.WRITE_ONLY)
    private ProcessServerDetails processServer;

    /*
     * The of RCM proxy.
     */
    @JsonProperty(value = "rcmProxy", access = JsonProperty.Access.WRITE_ONLY)
    private RcmProxyDetails rcmProxy;

    /*
     * The push installer.
     */
    @JsonProperty(value = "pushInstaller", access = JsonProperty.Access.WRITE_ONLY)
    private PushInstallerDetails pushInstaller;

    /*
     * The replication agent.
     */
    @JsonProperty(value = "replicationAgent", access = JsonProperty.Access.WRITE_ONLY)
    private ReplicationAgentDetails replicationAgent;

    /*
     * The reprotect agent.
     */
    @JsonProperty(value = "reprotectAgent", access = JsonProperty.Access.WRITE_ONLY)
    private ReprotectAgentDetails reprotectAgent;

    /*
     * The Mars agent.
     */
    @JsonProperty(value = "marsAgent", access = JsonProperty.Access.WRITE_ONLY)
    private MarsAgentDetails marsAgent;

    /*
     * The DRA.
     */
    @JsonProperty(value = "dra", access = JsonProperty.Access.WRITE_ONLY)
    private DraDetails dra;

    /*
     * The switch provider blocking error information.
     */
    @JsonProperty(value = "switchProviderBlockingErrorDetails", access = JsonProperty.Access.WRITE_ONLY)
    private List<InMageRcmFabricSwitchProviderBlockingErrorDetails> switchProviderBlockingErrorDetails;

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

    /**
     * Get the id property: The appliance Id.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

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

    /**
     * Get the fabricArmId property: The fabric ARM Id.
     *
     * @return the fabricArmId value.
     */
    public String fabricArmId() {
        return this.fabricArmId;
    }

    /**
     * Get the processServer property: The process server.
     *
     * @return the processServer value.
     */
    public ProcessServerDetails processServer() {
        return this.processServer;
    }

    /**
     * Get the rcmProxy property: The of RCM proxy.
     *
     * @return the rcmProxy value.
     */
    public RcmProxyDetails rcmProxy() {
        return this.rcmProxy;
    }

    /**
     * Get the pushInstaller property: The push installer.
     *
     * @return the pushInstaller value.
     */
    public PushInstallerDetails pushInstaller() {
        return this.pushInstaller;
    }

    /**
     * Get the replicationAgent property: The replication agent.
     *
     * @return the replicationAgent value.
     */
    public ReplicationAgentDetails replicationAgent() {
        return this.replicationAgent;
    }

    /**
     * Get the reprotectAgent property: The reprotect agent.
     *
     * @return the reprotectAgent value.
     */
    public ReprotectAgentDetails reprotectAgent() {
        return this.reprotectAgent;
    }

    /**
     * Get the marsAgent property: The Mars agent.
     *
     * @return the marsAgent value.
     */
    public MarsAgentDetails marsAgent() {
        return this.marsAgent;
    }

    /**
     * Get the dra property: The DRA.
     *
     * @return the dra value.
     */
    public DraDetails dra() {
        return this.dra;
    }

    /**
     * Get the switchProviderBlockingErrorDetails property: The switch provider blocking error information.
     *
     * @return the switchProviderBlockingErrorDetails value.
     */
    public List<InMageRcmFabricSwitchProviderBlockingErrorDetails> switchProviderBlockingErrorDetails() {
        return this.switchProviderBlockingErrorDetails;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (processServer() != null) {
            processServer().validate();
        }
        if (rcmProxy() != null) {
            rcmProxy().validate();
        }
        if (pushInstaller() != null) {
            pushInstaller().validate();
        }
        if (replicationAgent() != null) {
            replicationAgent().validate();
        }
        if (reprotectAgent() != null) {
            reprotectAgent().validate();
        }
        if (marsAgent() != null) {
            marsAgent().validate();
        }
        if (dra() != null) {
            dra().validate();
        }
        if (switchProviderBlockingErrorDetails() != null) {
            switchProviderBlockingErrorDetails().forEach(e -> e.validate());
        }
    }
}
