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

package com.azure.resourcemanager.netapp.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Subvolume Patch Request properties. */
@Fluent
public final class SubvolumePatchRequest {
    /*
     * Subvolume Properties
     */
    @JsonProperty(value = "properties")
    private SubvolumePatchParams innerProperties;

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

    /**
     * Get the innerProperties property: Subvolume Properties.
     *
     * @return the innerProperties value.
     */
    private SubvolumePatchParams innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the size property: size
     *
     * <p>Truncate subvolume to the provided size in bytes.
     *
     * @return the size value.
     */
    public Long size() {
        return this.innerProperties() == null ? null : this.innerProperties().size();
    }

    /**
     * Set the size property: size
     *
     * <p>Truncate subvolume to the provided size in bytes.
     *
     * @param size the size value to set.
     * @return the SubvolumePatchRequest object itself.
     */
    public SubvolumePatchRequest withSize(Long size) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SubvolumePatchParams();
        }
        this.innerProperties().withSize(size);
        return this;
    }

    /**
     * Get the path property: path
     *
     * <p>path to the subvolume.
     *
     * @return the path value.
     */
    public String path() {
        return this.innerProperties() == null ? null : this.innerProperties().path();
    }

    /**
     * Set the path property: path
     *
     * <p>path to the subvolume.
     *
     * @param path the path value to set.
     * @return the SubvolumePatchRequest object itself.
     */
    public SubvolumePatchRequest withPath(String path) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SubvolumePatchParams();
        }
        this.innerProperties().withPath(path);
        return this;
    }

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