// 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.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Provider specific input for InMageAzureV2 switch provider. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("InMageAzureV2")
@Fluent
public final class InMageAzureV2SwitchProviderInput extends SwitchProviderSpecificInput {
    /*
     * The target vault Id.
     */
    @JsonProperty(value = "targetVaultID", required = true)
    private String targetVaultId;

    /*
     * The target fabric Id.
     */
    @JsonProperty(value = "targetFabricID", required = true)
    private String targetFabricId;

    /*
     * The target appliance Id.
     */
    @JsonProperty(value = "targetApplianceID", required = true)
    private String targetApplianceId;

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

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

    /**
     * Set the targetVaultId property: The target vault Id.
     *
     * @param targetVaultId the targetVaultId value to set.
     * @return the InMageAzureV2SwitchProviderInput object itself.
     */
    public InMageAzureV2SwitchProviderInput withTargetVaultId(String targetVaultId) {
        this.targetVaultId = targetVaultId;
        return this;
    }

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

    /**
     * Set the targetFabricId property: The target fabric Id.
     *
     * @param targetFabricId the targetFabricId value to set.
     * @return the InMageAzureV2SwitchProviderInput object itself.
     */
    public InMageAzureV2SwitchProviderInput withTargetFabricId(String targetFabricId) {
        this.targetFabricId = targetFabricId;
        return this;
    }

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

    /**
     * Set the targetApplianceId property: The target appliance Id.
     *
     * @param targetApplianceId the targetApplianceId value to set.
     * @return the InMageAzureV2SwitchProviderInput object itself.
     */
    public InMageAzureV2SwitchProviderInput withTargetApplianceId(String targetApplianceId) {
        this.targetApplianceId = targetApplianceId;
        return this;
    }

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

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