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

package com.azure.resourcemanager.networkcloud.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachinePatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** BareMetalMachinePatchParameters represents the body of the request to patch bare metal machine properties. */
@Fluent
public final class BareMetalMachinePatchParameters {
    /*
     * BareMetalMachinePatchProperties represents the properties of the bare metal machine that can be patched.
     *
     * The list of the resource properties.
     */
    @JsonProperty(value = "properties")
    private BareMetalMachinePatchProperties innerProperties;

    /*
     * The Azure resource tags that will replace the existing ones.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the innerProperties property: BareMetalMachinePatchProperties represents the properties of the bare metal
     * machine that can be patched.
     *
     * <p>The list of the resource properties.
     *
     * @return the innerProperties value.
     */
    private BareMetalMachinePatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the BareMetalMachinePatchParameters object itself.
     */
    public BareMetalMachinePatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the machineDetails property: The details provided by the customer during the creation of rack manifests that
     * allows for custom data to be associated with this machine.
     *
     * @return the machineDetails value.
     */
    public String machineDetails() {
        return this.innerProperties() == null ? null : this.innerProperties().machineDetails();
    }

    /**
     * Set the machineDetails property: The details provided by the customer during the creation of rack manifests that
     * allows for custom data to be associated with this machine.
     *
     * @param machineDetails the machineDetails value to set.
     * @return the BareMetalMachinePatchParameters object itself.
     */
    public BareMetalMachinePatchParameters withMachineDetails(String machineDetails) {
        if (this.innerProperties() == null) {
            this.innerProperties = new BareMetalMachinePatchProperties();
        }
        this.innerProperties().withMachineDetails(machineDetails);
        return this;
    }

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