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

com.azure.resourcemanager.securityinsights.implementation.DataConnectorsCheckRequirementsOperationsImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09.

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.securityinsights.implementation;

import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient;
import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner;
import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState;
import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements;
import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations;

public final class DataConnectorsCheckRequirementsOperationsImpl implements DataConnectorsCheckRequirementsOperations {
    private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsCheckRequirementsOperationsImpl.class);

    private final DataConnectorsCheckRequirementsOperationsClient innerClient;

    private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager;

    public DataConnectorsCheckRequirementsOperationsImpl(DataConnectorsCheckRequirementsOperationsClient innerClient,
        com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public Response postWithResponse(String resourceGroupName, String workspaceName,
        DataConnectorsCheckRequirements dataConnectorsCheckRequirements, Context context) {
        Response inner = this.serviceClient()
            .postWithResponse(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context);
        if (inner != null) {
            return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
                new DataConnectorRequirementsStateImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public DataConnectorRequirementsState post(String resourceGroupName, String workspaceName,
        DataConnectorsCheckRequirements dataConnectorsCheckRequirements) {
        DataConnectorRequirementsStateInner inner
            = this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements);
        if (inner != null) {
            return new DataConnectorRequirementsStateImpl(inner, this.manager());
        } else {
            return null;
        }
    }

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

    private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() {
        return this.serviceManager;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy