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

package com.azure.resourcemanager.resourcehealth.implementation;

import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
import com.azure.resourcemanager.resourcehealth.models.KeyValueItem;
import java.util.Collections;
import java.util.List;

public final class EventImpactedResourceImpl implements EventImpactedResource {
    private EventImpactedResourceInner innerObject;

    private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;

    EventImpactedResourceImpl(
        EventImpactedResourceInner innerObject,
        com.azure.resourcemanager.resourcehealth.ResourceHealthManager 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 SystemData systemData() {
        return this.innerModel().systemData();
    }

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

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

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

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

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

    private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
        return this.serviceManager;
    }
}
