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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Replication protected item custom data details. */
@Fluent
public final class ProtectableItemProperties {
    /*
     * The name.
     */
    @JsonProperty(value = "friendlyName")
    private String friendlyName;

    /*
     * The protection status.
     */
    @JsonProperty(value = "protectionStatus")
    private String protectionStatus;

    /*
     * The ARM resource of protected items.
     */
    @JsonProperty(value = "replicationProtectedItemId")
    private String replicationProtectedItemId;

    /*
     * The recovery provider ARM Id.
     */
    @JsonProperty(value = "recoveryServicesProviderId")
    private String recoveryServicesProviderId;

    /*
     * The Current protection readiness errors.
     */
    @JsonProperty(value = "protectionReadinessErrors")
    private List<String> protectionReadinessErrors;

    /*
     * The list of replication providers supported for the protectable item.
     */
    @JsonProperty(value = "supportedReplicationProviders")
    private List<String> supportedReplicationProviders;

    /*
     * The Replication provider custom settings.
     */
    @JsonProperty(value = "customDetails")
    private ConfigurationSettings customDetails;

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

    /**
     * Get the friendlyName property: The name.
     *
     * @return the friendlyName value.
     */
    public String friendlyName() {
        return this.friendlyName;
    }

    /**
     * Set the friendlyName property: The name.
     *
     * @param friendlyName the friendlyName value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withFriendlyName(String friendlyName) {
        this.friendlyName = friendlyName;
        return this;
    }

    /**
     * Get the protectionStatus property: The protection status.
     *
     * @return the protectionStatus value.
     */
    public String protectionStatus() {
        return this.protectionStatus;
    }

    /**
     * Set the protectionStatus property: The protection status.
     *
     * @param protectionStatus the protectionStatus value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withProtectionStatus(String protectionStatus) {
        this.protectionStatus = protectionStatus;
        return this;
    }

    /**
     * Get the replicationProtectedItemId property: The ARM resource of protected items.
     *
     * @return the replicationProtectedItemId value.
     */
    public String replicationProtectedItemId() {
        return this.replicationProtectedItemId;
    }

    /**
     * Set the replicationProtectedItemId property: The ARM resource of protected items.
     *
     * @param replicationProtectedItemId the replicationProtectedItemId value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withReplicationProtectedItemId(String replicationProtectedItemId) {
        this.replicationProtectedItemId = replicationProtectedItemId;
        return this;
    }

    /**
     * Get the recoveryServicesProviderId property: The recovery provider ARM Id.
     *
     * @return the recoveryServicesProviderId value.
     */
    public String recoveryServicesProviderId() {
        return this.recoveryServicesProviderId;
    }

    /**
     * Set the recoveryServicesProviderId property: The recovery provider ARM Id.
     *
     * @param recoveryServicesProviderId the recoveryServicesProviderId value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withRecoveryServicesProviderId(String recoveryServicesProviderId) {
        this.recoveryServicesProviderId = recoveryServicesProviderId;
        return this;
    }

    /**
     * Get the protectionReadinessErrors property: The Current protection readiness errors.
     *
     * @return the protectionReadinessErrors value.
     */
    public List<String> protectionReadinessErrors() {
        return this.protectionReadinessErrors;
    }

    /**
     * Set the protectionReadinessErrors property: The Current protection readiness errors.
     *
     * @param protectionReadinessErrors the protectionReadinessErrors value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withProtectionReadinessErrors(List<String> protectionReadinessErrors) {
        this.protectionReadinessErrors = protectionReadinessErrors;
        return this;
    }

    /**
     * Get the supportedReplicationProviders property: The list of replication providers supported for the protectable
     * item.
     *
     * @return the supportedReplicationProviders value.
     */
    public List<String> supportedReplicationProviders() {
        return this.supportedReplicationProviders;
    }

    /**
     * Set the supportedReplicationProviders property: The list of replication providers supported for the protectable
     * item.
     *
     * @param supportedReplicationProviders the supportedReplicationProviders value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withSupportedReplicationProviders(List<String> supportedReplicationProviders) {
        this.supportedReplicationProviders = supportedReplicationProviders;
        return this;
    }

    /**
     * Get the customDetails property: The Replication provider custom settings.
     *
     * @return the customDetails value.
     */
    public ConfigurationSettings customDetails() {
        return this.customDetails;
    }

    /**
     * Set the customDetails property: The Replication provider custom settings.
     *
     * @param customDetails the customDetails value to set.
     * @return the ProtectableItemProperties object itself.
     */
    public ProtectableItemProperties withCustomDetails(ConfigurationSettings customDetails) {
        this.customDetails = customDetails;
        return this;
    }

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