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

package com.azure.resourcemanager.alertsmanagement.implementation;

import com.azure.resourcemanager.alertsmanagement.fluent.models.SmartGroupInner;
import com.azure.resourcemanager.alertsmanagement.models.Severity;
import com.azure.resourcemanager.alertsmanagement.models.SmartGroup;
import com.azure.resourcemanager.alertsmanagement.models.SmartGroupAggregatedProperty;
import com.azure.resourcemanager.alertsmanagement.models.State;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class SmartGroupImpl implements SmartGroup {
    private SmartGroupInner innerObject;

    private final com.azure.resourcemanager.alertsmanagement.AlertsManagementManager serviceManager;

    SmartGroupImpl(
        SmartGroupInner innerObject,
        com.azure.resourcemanager.alertsmanagement.AlertsManagementManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public String id() {
        return this.innerModel().id();
    }

    public String name() {
        return this.innerModel().name();
    }

    public String type() {
        return this.innerModel().type();
    }

    public Long alertsCount() {
        return this.innerModel().alertsCount();
    }

    public State smartGroupState() {
        return this.innerModel().smartGroupState();
    }

    public Severity severity() {
        return this.innerModel().severity();
    }

    public OffsetDateTime startDateTime() {
        return this.innerModel().startDateTime();
    }

    public OffsetDateTime lastModifiedDateTime() {
        return this.innerModel().lastModifiedDateTime();
    }

    public String lastModifiedUsername() {
        return this.innerModel().lastModifiedUsername();
    }

    public List<SmartGroupAggregatedProperty> resources() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().resources();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> resourceTypes() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().resourceTypes();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> resourceGroups() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().resourceGroups();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> monitorServices() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().monitorServices();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> monitorConditions() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().monitorConditions();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> alertStates() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().alertStates();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<SmartGroupAggregatedProperty> alertSeverities() {
        List<SmartGroupAggregatedProperty> inner = this.innerModel().alertSeverities();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public String nextLink() {
        return this.innerModel().nextLink();
    }

    public SmartGroupInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.alertsmanagement.AlertsManagementManager manager() {
        return this.serviceManager;
    }
}
