// 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.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Azure to Azure VM synced configuration details. */
@Fluent
public final class AzureToAzureVmSyncedConfigDetails {
    /*
     * The Azure VM tags.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * The Azure VM input endpoints.
     */
    @JsonProperty(value = "inputEndpoints")
    private List<InputEndpoint> inputEndpoints;

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

    /**
     * Get the tags property: The Azure VM tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The Azure VM tags.
     *
     * @param tags the tags value to set.
     * @return the AzureToAzureVmSyncedConfigDetails object itself.
     */
    public AzureToAzureVmSyncedConfigDetails withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the inputEndpoints property: The Azure VM input endpoints.
     *
     * @return the inputEndpoints value.
     */
    public List<InputEndpoint> inputEndpoints() {
        return this.inputEndpoints;
    }

    /**
     * Set the inputEndpoints property: The Azure VM input endpoints.
     *
     * @param inputEndpoints the inputEndpoints value to set.
     * @return the AzureToAzureVmSyncedConfigDetails object itself.
     */
    public AzureToAzureVmSyncedConfigDetails withInputEndpoints(List<InputEndpoint> inputEndpoints) {
        this.inputEndpoints = inputEndpoints;
        return this;
    }

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