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

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Details of an inquired protectable item. */
@Fluent
public final class WorkloadInquiryDetails {
    /*
     * Type of the Workload such as SQL, Oracle etc.
     */
    @JsonProperty(value = "type")
    private String type;

    /*
     * Contains the protectable item Count inside this Container.
     */
    @JsonProperty(value = "itemCount")
    private Long itemCount;

    /*
     * Inquiry validation such as permissions and other backup validations.
     */
    @JsonProperty(value = "inquiryValidation")
    private InquiryValidation inquiryValidation;

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

    /**
     * Get the type property: Type of the Workload such as SQL, Oracle etc.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Set the type property: Type of the Workload such as SQL, Oracle etc.
     *
     * @param type the type value to set.
     * @return the WorkloadInquiryDetails object itself.
     */
    public WorkloadInquiryDetails withType(String type) {
        this.type = type;
        return this;
    }

    /**
     * Get the itemCount property: Contains the protectable item Count inside this Container.
     *
     * @return the itemCount value.
     */
    public Long itemCount() {
        return this.itemCount;
    }

    /**
     * Set the itemCount property: Contains the protectable item Count inside this Container.
     *
     * @param itemCount the itemCount value to set.
     * @return the WorkloadInquiryDetails object itself.
     */
    public WorkloadInquiryDetails withItemCount(Long itemCount) {
        this.itemCount = itemCount;
        return this;
    }

    /**
     * Get the inquiryValidation property: Inquiry validation such as permissions and other backup validations.
     *
     * @return the inquiryValidation value.
     */
    public InquiryValidation inquiryValidation() {
        return this.inquiryValidation;
    }

    /**
     * Set the inquiryValidation property: Inquiry validation such as permissions and other backup validations.
     *
     * @param inquiryValidation the inquiryValidation value to set.
     * @return the WorkloadInquiryDetails object itself.
     */
    public WorkloadInquiryDetails withInquiryValidation(InquiryValidation inquiryValidation) {
        this.inquiryValidation = inquiryValidation;
        return this;
    }

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