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

package com.azure.resourcemanager.newrelicobservability.models;

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

/** Request of a Hosts get Operation. */
@Fluent
public final class HostsGetRequest {
    /*
     * VM resource IDs
     */
    @JsonProperty(value = "vmIds")
    private List<String> vmIds;

    /*
     * User Email
     */
    @JsonProperty(value = "userEmail", required = true)
    private String userEmail;

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

    /**
     * Get the vmIds property: VM resource IDs.
     *
     * @return the vmIds value.
     */
    public List<String> vmIds() {
        return this.vmIds;
    }

    /**
     * Set the vmIds property: VM resource IDs.
     *
     * @param vmIds the vmIds value to set.
     * @return the HostsGetRequest object itself.
     */
    public HostsGetRequest withVmIds(List<String> vmIds) {
        this.vmIds = vmIds;
        return this;
    }

    /**
     * Get the userEmail property: User Email.
     *
     * @return the userEmail value.
     */
    public String userEmail() {
        return this.userEmail;
    }

    /**
     * Set the userEmail property: User Email.
     *
     * @param userEmail the userEmail value to set.
     * @return the HostsGetRequest object itself.
     */
    public HostsGetRequest withUserEmail(String userEmail) {
        this.userEmail = userEmail;
        return this;
    }

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

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