// 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.fasterxml.jackson.annotation.JsonProperty;

/** Input to get capabilities information for Microsoft.RecoveryServices. */
@Fluent
public final class ResourceCapabilities extends ResourceCapabilitiesBase {
    /*
     * Capabilities information
     */
    @JsonProperty(value = "properties")
    private CapabilitiesProperties properties;

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

    /**
     * Get the properties property: Capabilities information.
     *
     * @return the properties value.
     */
    public CapabilitiesProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Capabilities information.
     *
     * @param properties the properties value to set.
     * @return the ResourceCapabilities object itself.
     */
    public ResourceCapabilities withProperties(CapabilitiesProperties properties) {
        this.properties = properties;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ResourceCapabilities withType(String type) {
        super.withType(type);
        return this;
    }

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