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

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

import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.security.models.TopologySingleResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** The TopologyResource model. */
@Immutable
public final class TopologyResourceInner extends ProxyResource {
    /*
     * The properties property.
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private TopologyResourceProperties innerProperties;

    /*
     * Location where the resource is stored
     */
    @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
    private String location;

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

    /**
     * Get the innerProperties property: The properties property.
     *
     * @return the innerProperties value.
     */
    private TopologyResourceProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the location property: Location where the resource is stored.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Get the calculatedDateTime property: The UTC time on which the topology was calculated.
     *
     * @return the calculatedDateTime value.
     */
    public OffsetDateTime calculatedDateTime() {
        return this.innerProperties() == null ? null : this.innerProperties().calculatedDateTime();
    }

    /**
     * Get the topologyResources property: Azure resources which are part of this topology resource.
     *
     * @return the topologyResources value.
     */
    public List<TopologySingleResource> topologyResources() {
        return this.innerProperties() == null ? null : this.innerProperties().topologyResources();
    }

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