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

package com.azure.resourcemanager.logz.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Request of a list VM Host Update Operation. */
@Fluent
public final class VMHostUpdateRequest {
    /*
     * Request of a list vm host update operation.
     */
    @JsonProperty(value = "vmResourceIds")
    private List<VMResourcesInner> vmResourceIds;

    /*
     * Specifies the state of the operation - install/ delete.
     */
    @JsonProperty(value = "state")
    private VMHostUpdateStates state;

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

    /**
     * Get the vmResourceIds property: Request of a list vm host update operation.
     *
     * @return the vmResourceIds value.
     */
    public List<VMResourcesInner> vmResourceIds() {
        return this.vmResourceIds;
    }

    /**
     * Set the vmResourceIds property: Request of a list vm host update operation.
     *
     * @param vmResourceIds the vmResourceIds value to set.
     * @return the VMHostUpdateRequest object itself.
     */
    public VMHostUpdateRequest withVmResourceIds(List<VMResourcesInner> vmResourceIds) {
        this.vmResourceIds = vmResourceIds;
        return this;
    }

    /**
     * Get the state property: Specifies the state of the operation - install/ delete.
     *
     * @return the state value.
     */
    public VMHostUpdateStates state() {
        return this.state;
    }

    /**
     * Set the state property: Specifies the state of the operation - install/ delete.
     *
     * @param state the state value to set.
     * @return the VMHostUpdateRequest object itself.
     */
    public VMHostUpdateRequest withState(VMHostUpdateStates state) {
        this.state = state;
        return this;
    }

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