All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.elastic.fluent.models.ElasticMonitorResourceInner Maven / Gradle / Ivy

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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.elastic.models.IdentityProperties;
import com.azure.resourcemanager.elastic.models.MonitorProperties;
import com.azure.resourcemanager.elastic.models.ResourceSku;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Monitor resource. */
@Fluent
public final class ElasticMonitorResourceInner extends Resource {
    /*
     * SKU of the monitor resource.
     */
    @JsonProperty(value = "sku")
    private ResourceSku sku;

    /*
     * Properties of the monitor resource.
     */
    @JsonProperty(value = "properties")
    private MonitorProperties properties;

    /*
     * Identity properties of the monitor resource.
     */
    @JsonProperty(value = "identity")
    private IdentityProperties identity;

    /*
     * The system metadata relating to this resource
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the sku property: SKU of the monitor resource.
     *
     * @return the sku value.
     */
    public ResourceSku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: SKU of the monitor resource.
     *
     * @param sku the sku value to set.
     * @return the ElasticMonitorResourceInner object itself.
     */
    public ElasticMonitorResourceInner withSku(ResourceSku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the properties property: Properties of the monitor resource.
     *
     * @return the properties value.
     */
    public MonitorProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Properties of the monitor resource.
     *
     * @param properties the properties value to set.
     * @return the ElasticMonitorResourceInner object itself.
     */
    public ElasticMonitorResourceInner withProperties(MonitorProperties properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the identity property: Identity properties of the monitor resource.
     *
     * @return the identity value.
     */
    public IdentityProperties identity() {
        return this.identity;
    }

    /**
     * Set the identity property: Identity properties of the monitor resource.
     *
     * @param identity the identity value to set.
     * @return the ElasticMonitorResourceInner object itself.
     */
    public ElasticMonitorResourceInner withIdentity(IdentityProperties identity) {
        this.identity = identity;
        return this;
    }

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

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

    /** {@inheritDoc} */
    @Override
    public ElasticMonitorResourceInner withTags(Map tags) {
        super.withTags(tags);
        return this;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy