// 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.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.attestation.models.AttestationServiceStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Attestation service response message. */
@Fluent
public final class AttestationProviderInner extends Resource {
    /*
     * The system metadata relating to this resource
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Describes Attestation service status.
     */
    @JsonProperty(value = "properties")
    private StatusResult innerProperties;

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

    /**
     * Get the systemData property: The system metadata relating to this resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the innerProperties property: Describes Attestation service status.
     *
     * @return the innerProperties value.
     */
    private StatusResult innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public AttestationProviderInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AttestationProviderInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

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

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

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

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

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

    /**
     * Set the attestUri property: Gets the uri of attestation service.
     *
     * @param attestUri the attestUri value to set.
     * @return the AttestationProviderInner object itself.
     */
    public AttestationProviderInner withAttestUri(String attestUri) {
        if (this.innerProperties() == null) {
            this.innerProperties = new StatusResult();
        }
        this.innerProperties().withAttestUri(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.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
    }

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