// 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;

/** VMwareV2 fabric provider specific settings. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("VMwareV2")
@Fluent
public final class VMwareV2FabricCreationInput extends FabricSpecificCreationInput {
    /*
     * The ARM Id of the VMware site.
     */
    @JsonProperty(value = "vmwareSiteId")
    private String vmwareSiteId;

    /*
     * The ARM Id of the physical site.
     */
    @JsonProperty(value = "physicalSiteId")
    private String physicalSiteId;

    /*
     * The ARM Id of the migration solution.
     */
    @JsonProperty(value = "migrationSolutionId", required = true)
    private String migrationSolutionId;

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

    /**
     * Get the vmwareSiteId property: The ARM Id of the VMware site.
     *
     * @return the vmwareSiteId value.
     */
    public String vmwareSiteId() {
        return this.vmwareSiteId;
    }

    /**
     * Set the vmwareSiteId property: The ARM Id of the VMware site.
     *
     * @param vmwareSiteId the vmwareSiteId value to set.
     * @return the VMwareV2FabricCreationInput object itself.
     */
    public VMwareV2FabricCreationInput withVmwareSiteId(String vmwareSiteId) {
        this.vmwareSiteId = vmwareSiteId;
        return this;
    }

    /**
     * Get the physicalSiteId property: The ARM Id of the physical site.
     *
     * @return the physicalSiteId value.
     */
    public String physicalSiteId() {
        return this.physicalSiteId;
    }

    /**
     * Set the physicalSiteId property: The ARM Id of the physical site.
     *
     * @param physicalSiteId the physicalSiteId value to set.
     * @return the VMwareV2FabricCreationInput object itself.
     */
    public VMwareV2FabricCreationInput withPhysicalSiteId(String physicalSiteId) {
        this.physicalSiteId = physicalSiteId;
        return this;
    }

    /**
     * Get the migrationSolutionId property: The ARM Id of the migration solution.
     *
     * @return the migrationSolutionId value.
     */
    public String migrationSolutionId() {
        return this.migrationSolutionId;
    }

    /**
     * Set the migrationSolutionId property: The ARM Id of the migration solution.
     *
     * @param migrationSolutionId the migrationSolutionId value to set.
     * @return the VMwareV2FabricCreationInput object itself.
     */
    public VMwareV2FabricCreationInput withMigrationSolutionId(String migrationSolutionId) {
        this.migrationSolutionId = migrationSolutionId;
        return this;
    }

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

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