// 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.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Process server details. */
@Immutable
public final class ProcessServerDetails {
    /*
     * The process server Id.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * The process server name.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The process server Bios Id.
     */
    @JsonProperty(value = "biosId", access = JsonProperty.Access.WRITE_ONLY)
    private String biosId;

    /*
     * The fabric object Id.
     */
    @JsonProperty(value = "fabricObjectId", access = JsonProperty.Access.WRITE_ONLY)
    private String fabricObjectId;

    /*
     * The process server Fqdn.
     */
    @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY)
    private String fqdn;

    /*
     * The list of IP addresses for communicating with the RCM component.
     */
    @JsonProperty(value = "ipAddresses", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> ipAddresses;

    /*
     * The version.
     */
    @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY)
    private String version;

    /*
     * The last heartbeat received from the process server.
     */
    @JsonProperty(value = "lastHeartbeatUtc", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastHeartbeatUtc;

    /*
     * The total memory.
     */
    @JsonProperty(value = "totalMemoryInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalMemoryInBytes;

    /*
     * The available memory.
     */
    @JsonProperty(value = "availableMemoryInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long availableMemoryInBytes;

    /*
     * The used memory.
     */
    @JsonProperty(value = "usedMemoryInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long usedMemoryInBytes;

    /*
     * The memory usage percentage.
     */
    @JsonProperty(value = "memoryUsagePercentage", access = JsonProperty.Access.WRITE_ONLY)
    private Double memoryUsagePercentage;

    /*
     * The total disk space.
     */
    @JsonProperty(value = "totalSpaceInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalSpaceInBytes;

    /*
     * The available disk space.
     */
    @JsonProperty(value = "availableSpaceInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long availableSpaceInBytes;

    /*
     * The used disk space.
     */
    @JsonProperty(value = "usedSpaceInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long usedSpaceInBytes;

    /*
     * The free disk space percentage.
     */
    @JsonProperty(value = "freeSpacePercentage", access = JsonProperty.Access.WRITE_ONLY)
    private Double freeSpacePercentage;

    /*
     * The uploading pending data in bytes.
     */
    @JsonProperty(value = "throughputUploadPendingDataInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long throughputUploadPendingDataInBytes;

    /*
     * The throughput in bytes.
     */
    @JsonProperty(value = "throughputInBytes", access = JsonProperty.Access.WRITE_ONLY)
    private Long throughputInBytes;

    /*
     * The processor usage percentage.
     */
    @JsonProperty(value = "processorUsagePercentage", access = JsonProperty.Access.WRITE_ONLY)
    private Double processorUsagePercentage;

    /*
     * The throughput status.
     */
    @JsonProperty(value = "throughputStatus", access = JsonProperty.Access.WRITE_ONLY)
    private RcmComponentStatus throughputStatus;

    /*
     * The system load.
     */
    @JsonProperty(value = "systemLoad", access = JsonProperty.Access.WRITE_ONLY)
    private Long systemLoad;

    /*
     * The system load status.
     */
    @JsonProperty(value = "systemLoadStatus", access = JsonProperty.Access.WRITE_ONLY)
    private RcmComponentStatus systemLoadStatus;

    /*
     * The disk usage status.
     */
    @JsonProperty(value = "diskUsageStatus", access = JsonProperty.Access.WRITE_ONLY)
    private RcmComponentStatus diskUsageStatus;

    /*
     * The memory usage status.
     */
    @JsonProperty(value = "memoryUsageStatus", access = JsonProperty.Access.WRITE_ONLY)
    private RcmComponentStatus memoryUsageStatus;

    /*
     * The processor usage status.
     */
    @JsonProperty(value = "processorUsageStatus", access = JsonProperty.Access.WRITE_ONLY)
    private RcmComponentStatus processorUsageStatus;

    /*
     * The health of the process server.
     */
    @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY)
    private ProtectionHealth health;

    /*
     * The health errors.
     */
    @JsonProperty(value = "healthErrors", access = JsonProperty.Access.WRITE_ONLY)
    private List<HealthError> healthErrors;

    /*
     * The protected item count.
     */
    @JsonProperty(value = "protectedItemCount", access = JsonProperty.Access.WRITE_ONLY)
    private Integer protectedItemCount;

    /*
     * The historic health of the process server based on the health in last 24 hours.
     */
    @JsonProperty(value = "historicHealth", access = JsonProperty.Access.WRITE_ONLY)
    private ProtectionHealth historicHealth;

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

    /**
     * Get the id property: The process server Id.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

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

    /**
     * Get the biosId property: The process server Bios Id.
     *
     * @return the biosId value.
     */
    public String biosId() {
        return this.biosId;
    }

    /**
     * Get the fabricObjectId property: The fabric object Id.
     *
     * @return the fabricObjectId value.
     */
    public String fabricObjectId() {
        return this.fabricObjectId;
    }

    /**
     * Get the fqdn property: The process server Fqdn.
     *
     * @return the fqdn value.
     */
    public String fqdn() {
        return this.fqdn;
    }

    /**
     * Get the ipAddresses property: The list of IP addresses for communicating with the RCM component.
     *
     * @return the ipAddresses value.
     */
    public List<String> ipAddresses() {
        return this.ipAddresses;
    }

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

    /**
     * Get the lastHeartbeatUtc property: The last heartbeat received from the process server.
     *
     * @return the lastHeartbeatUtc value.
     */
    public OffsetDateTime lastHeartbeatUtc() {
        return this.lastHeartbeatUtc;
    }

    /**
     * Get the totalMemoryInBytes property: The total memory.
     *
     * @return the totalMemoryInBytes value.
     */
    public Long totalMemoryInBytes() {
        return this.totalMemoryInBytes;
    }

    /**
     * Get the availableMemoryInBytes property: The available memory.
     *
     * @return the availableMemoryInBytes value.
     */
    public Long availableMemoryInBytes() {
        return this.availableMemoryInBytes;
    }

    /**
     * Get the usedMemoryInBytes property: The used memory.
     *
     * @return the usedMemoryInBytes value.
     */
    public Long usedMemoryInBytes() {
        return this.usedMemoryInBytes;
    }

    /**
     * Get the memoryUsagePercentage property: The memory usage percentage.
     *
     * @return the memoryUsagePercentage value.
     */
    public Double memoryUsagePercentage() {
        return this.memoryUsagePercentage;
    }

    /**
     * Get the totalSpaceInBytes property: The total disk space.
     *
     * @return the totalSpaceInBytes value.
     */
    public Long totalSpaceInBytes() {
        return this.totalSpaceInBytes;
    }

    /**
     * Get the availableSpaceInBytes property: The available disk space.
     *
     * @return the availableSpaceInBytes value.
     */
    public Long availableSpaceInBytes() {
        return this.availableSpaceInBytes;
    }

    /**
     * Get the usedSpaceInBytes property: The used disk space.
     *
     * @return the usedSpaceInBytes value.
     */
    public Long usedSpaceInBytes() {
        return this.usedSpaceInBytes;
    }

    /**
     * Get the freeSpacePercentage property: The free disk space percentage.
     *
     * @return the freeSpacePercentage value.
     */
    public Double freeSpacePercentage() {
        return this.freeSpacePercentage;
    }

    /**
     * Get the throughputUploadPendingDataInBytes property: The uploading pending data in bytes.
     *
     * @return the throughputUploadPendingDataInBytes value.
     */
    public Long throughputUploadPendingDataInBytes() {
        return this.throughputUploadPendingDataInBytes;
    }

    /**
     * Get the throughputInBytes property: The throughput in bytes.
     *
     * @return the throughputInBytes value.
     */
    public Long throughputInBytes() {
        return this.throughputInBytes;
    }

    /**
     * Get the processorUsagePercentage property: The processor usage percentage.
     *
     * @return the processorUsagePercentage value.
     */
    public Double processorUsagePercentage() {
        return this.processorUsagePercentage;
    }

    /**
     * Get the throughputStatus property: The throughput status.
     *
     * @return the throughputStatus value.
     */
    public RcmComponentStatus throughputStatus() {
        return this.throughputStatus;
    }

    /**
     * Get the systemLoad property: The system load.
     *
     * @return the systemLoad value.
     */
    public Long systemLoad() {
        return this.systemLoad;
    }

    /**
     * Get the systemLoadStatus property: The system load status.
     *
     * @return the systemLoadStatus value.
     */
    public RcmComponentStatus systemLoadStatus() {
        return this.systemLoadStatus;
    }

    /**
     * Get the diskUsageStatus property: The disk usage status.
     *
     * @return the diskUsageStatus value.
     */
    public RcmComponentStatus diskUsageStatus() {
        return this.diskUsageStatus;
    }

    /**
     * Get the memoryUsageStatus property: The memory usage status.
     *
     * @return the memoryUsageStatus value.
     */
    public RcmComponentStatus memoryUsageStatus() {
        return this.memoryUsageStatus;
    }

    /**
     * Get the processorUsageStatus property: The processor usage status.
     *
     * @return the processorUsageStatus value.
     */
    public RcmComponentStatus processorUsageStatus() {
        return this.processorUsageStatus;
    }

    /**
     * Get the health property: The health of the process server.
     *
     * @return the health value.
     */
    public ProtectionHealth health() {
        return this.health;
    }

    /**
     * Get the healthErrors property: The health errors.
     *
     * @return the healthErrors value.
     */
    public List<HealthError> healthErrors() {
        return this.healthErrors;
    }

    /**
     * Get the protectedItemCount property: The protected item count.
     *
     * @return the protectedItemCount value.
     */
    public Integer protectedItemCount() {
        return this.protectedItemCount;
    }

    /**
     * Get the historicHealth property: The historic health of the process server based on the health in last 24 hours.
     *
     * @return the historicHealth value.
     */
    public ProtectionHealth historicHealth() {
        return this.historicHealth;
    }

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