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

package com.azure.resourcemanager.machinelearning.implementation;

import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner;
import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner;
import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys;
import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode;
import com.azure.resourcemanager.machinelearning.models.EndpointPropertiesBase;
import java.util.Collections;
import java.util.Map;

public final class EndpointPropertiesBaseImpl implements EndpointPropertiesBase {
    private EndpointPropertiesBaseInner innerObject;

    private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager;

    EndpointPropertiesBaseImpl(
        EndpointPropertiesBaseInner innerObject,
        com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public EndpointAuthMode authMode() {
        return this.innerModel().authMode();
    }

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

    public EndpointAuthKeys keys() {
        EndpointAuthKeysInner inner = this.innerModel().keys();
        if (inner != null) {
            return new EndpointAuthKeysImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Map<String, String> properties() {
        Map<String, String> inner = this.innerModel().properties();
        if (inner != null) {
            return Collections.unmodifiableMap(inner);
        } else {
            return Collections.emptyMap();
        }
    }

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

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

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

    private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() {
        return this.serviceManager;
    }
}
