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

package com.azure.resourcemanager.automation.implementation;

import com.azure.resourcemanager.automation.fluent.models.RunbookCreateOrUpdateParametersInner;
import com.azure.resourcemanager.automation.fluent.models.RunbookDraftInner;
import com.azure.resourcemanager.automation.models.ContentLink;
import com.azure.resourcemanager.automation.models.RunbookCreateOrUpdateParameters;
import com.azure.resourcemanager.automation.models.RunbookDraft;
import com.azure.resourcemanager.automation.models.RunbookTypeEnum;
import java.util.Collections;
import java.util.Map;

public final class RunbookCreateOrUpdateParametersImpl implements RunbookCreateOrUpdateParameters {
    private RunbookCreateOrUpdateParametersInner innerObject;

    private final com.azure.resourcemanager.automation.AutomationManager serviceManager;

    RunbookCreateOrUpdateParametersImpl(
        RunbookCreateOrUpdateParametersInner innerObject,
        com.azure.resourcemanager.automation.AutomationManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

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

    public Boolean logVerbose() {
        return this.innerModel().logVerbose();
    }

    public Boolean logProgress() {
        return this.innerModel().logProgress();
    }

    public RunbookTypeEnum runbookType() {
        return this.innerModel().runbookType();
    }

    public RunbookDraft draft() {
        RunbookDraftInner inner = this.innerModel().draft();
        if (inner != null) {
            return new RunbookDraftImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public ContentLink publishContentLink() {
        return this.innerModel().publishContentLink();
    }

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

    public Integer logActivityTrace() {
        return this.innerModel().logActivityTrace();
    }

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

    private com.azure.resourcemanager.automation.AutomationManager manager() {
        return this.serviceManager;
    }
}
