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

package com.azure.resourcemanager.attestation.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.attestation.models.AttestationServiceStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Status of attestation service. */
@Fluent
public final class StatusResult {
    /*
     * Trust model for the attestation provider.
     */
    @JsonProperty(value = "trustModel")
    private String trustModel;

    /*
     * Status of attestation service.
     */
    @JsonProperty(value = "status")
    private AttestationServiceStatus status;

    /*
     * Gets the uri of attestation service
     */
    @JsonProperty(value = "attestUri")
    private String attestUri;

    /*
     * List of private endpoint connections associated with the attestation provider.
     */
    @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
    private List<PrivateEndpointConnectionInner> privateEndpointConnections;

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

    /**
     * Get the trustModel property: Trust model for the attestation provider.
     *
     * @return the trustModel value.
     */
    public String trustModel() {
        return this.trustModel;
    }

    /**
     * Set the trustModel property: Trust model for the attestation provider.
     *
     * @param trustModel the trustModel value to set.
     * @return the StatusResult object itself.
     */
    public StatusResult withTrustModel(String trustModel) {
        this.trustModel = trustModel;
        return this;
    }

    /**
     * Get the status property: Status of attestation service.
     *
     * @return the status value.
     */
    public AttestationServiceStatus status() {
        return this.status;
    }

    /**
     * Set the status property: Status of attestation service.
     *
     * @param status the status value to set.
     * @return the StatusResult object itself.
     */
    public StatusResult withStatus(AttestationServiceStatus status) {
        this.status = status;
        return this;
    }

    /**
     * Get the attestUri property: Gets the uri of attestation service.
     *
     * @return the attestUri value.
     */
    public String attestUri() {
        return this.attestUri;
    }

    /**
     * Set the attestUri property: Gets the uri of attestation service.
     *
     * @param attestUri the attestUri value to set.
     * @return the StatusResult object itself.
     */
    public StatusResult withAttestUri(String attestUri) {
        this.attestUri = attestUri;
        return this;
    }

    /**
     * Get the privateEndpointConnections property: List of private endpoint connections associated with the attestation
     * provider.
     *
     * @return the privateEndpointConnections value.
     */
    public List<PrivateEndpointConnectionInner> privateEndpointConnections() {
        return this.privateEndpointConnections;
    }

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