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

com.azure.resourcemanager.hdinsight.implementation.ScriptExecutionHistoriesImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2021-06.

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

package com.azure.resourcemanager.hdinsight.implementation;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hdinsight.fluent.ScriptExecutionHistoriesClient;
import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner;
import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail;
import com.azure.resourcemanager.hdinsight.models.ScriptExecutionHistories;

public final class ScriptExecutionHistoriesImpl implements ScriptExecutionHistories {
    private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionHistoriesImpl.class);

    private final ScriptExecutionHistoriesClient innerClient;

    private final com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager;

    public ScriptExecutionHistoriesImpl(ScriptExecutionHistoriesClient innerClient,
        com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
        PagedIterable inner
            = this.serviceClient().listByCluster(resourceGroupName, clusterName);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager()));
    }

    public PagedIterable listByCluster(String resourceGroupName, String clusterName,
        Context context) {
        PagedIterable inner
            = this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager()));
    }

    public Response promoteWithResponse(String resourceGroupName, String clusterName, String scriptExecutionId,
        Context context) {
        return this.serviceClient().promoteWithResponse(resourceGroupName, clusterName, scriptExecutionId, context);
    }

    public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) {
        this.serviceClient().promote(resourceGroupName, clusterName, scriptExecutionId);
    }

    private ScriptExecutionHistoriesClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.hdinsight.HDInsightManager manager() {
        return this.serviceManager;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy