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

package com.azure.resourcemanager.recoveryservices.models;

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

/** Base class for request and response capabilities information for Microsoft.RecoveryServices. */
@Fluent
public class ResourceCapabilitiesBase {
    /*
     * Describes the Resource type: Microsoft.RecoveryServices/Vaults
     */
    @JsonProperty(value = "type", required = true)
    private String type;

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

    /**
     * Get the type property: Describes the Resource type: Microsoft.RecoveryServices/Vaults.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Set the type property: Describes the Resource type: Microsoft.RecoveryServices/Vaults.
     *
     * @param type the type value to set.
     * @return the ResourceCapabilitiesBase object itself.
     */
    public ResourceCapabilitiesBase withType(String type) {
        this.type = type;
        return this;
    }

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

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