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

package com.azure.resourcemanager.databoxedge.models;

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

/** File source details. */
@Fluent
public final class FileSourceInfo {
    /*
     * File share ID.
     */
    @JsonProperty(value = "shareId", required = true)
    private String shareId;

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

    /**
     * Get the shareId property: File share ID.
     *
     * @return the shareId value.
     */
    public String shareId() {
        return this.shareId;
    }

    /**
     * Set the shareId property: File share ID.
     *
     * @param shareId the shareId value to set.
     * @return the FileSourceInfo object itself.
     */
    public FileSourceInfo withShareId(String shareId) {
        this.shareId = shareId;
        return this;
    }

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

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