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

com.azure.resourcemanager.security.implementation.SqlVulnerabilityAssessmentBaselineRulesImpl Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.0.0
Show 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.security.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.security.fluent.SqlVulnerabilityAssessmentBaselineRulesClient;
import com.azure.resourcemanager.security.fluent.models.RuleResultsInner;
import com.azure.resourcemanager.security.fluent.models.RulesResultsInner;
import com.azure.resourcemanager.security.models.RuleResults;
import com.azure.resourcemanager.security.models.RulesResults;
import com.azure.resourcemanager.security.models.RulesResultsInput;
import com.azure.resourcemanager.security.models.SqlVulnerabilityAssessmentBaselineRules;

public final class SqlVulnerabilityAssessmentBaselineRulesImpl implements SqlVulnerabilityAssessmentBaselineRules {
    private static final ClientLogger LOGGER = new ClientLogger(SqlVulnerabilityAssessmentBaselineRulesImpl.class);

    private final SqlVulnerabilityAssessmentBaselineRulesClient innerClient;

    private final com.azure.resourcemanager.security.SecurityManager serviceManager;

    public SqlVulnerabilityAssessmentBaselineRulesImpl(SqlVulnerabilityAssessmentBaselineRulesClient innerClient,
        com.azure.resourcemanager.security.SecurityManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public Response getWithResponse(String ruleId, String workspaceId, String resourceId,
        Context context) {
        Response inner
            = this.serviceClient().getWithResponse(ruleId, workspaceId, resourceId, context);
        if (inner != null) {
            return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
                new RuleResultsImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public RuleResults get(String ruleId, String workspaceId, String resourceId) {
        RuleResultsInner inner = this.serviceClient().get(ruleId, workspaceId, resourceId);
        if (inner != null) {
            return new RuleResultsImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Response deleteWithResponse(String ruleId, String workspaceId, String resourceId, Context context) {
        return this.serviceClient().deleteWithResponse(ruleId, workspaceId, resourceId, context);
    }

    public void delete(String ruleId, String workspaceId, String resourceId) {
        this.serviceClient().delete(ruleId, workspaceId, resourceId);
    }

    public Response listWithResponse(String workspaceId, String resourceId, Context context) {
        Response inner = this.serviceClient().listWithResponse(workspaceId, resourceId, context);
        if (inner != null) {
            return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
                new RulesResultsImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public RulesResults list(String workspaceId, String resourceId) {
        RulesResultsInner inner = this.serviceClient().list(workspaceId, resourceId);
        if (inner != null) {
            return new RulesResultsImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Response addWithResponse(String workspaceId, String resourceId, RulesResultsInput body,
        Context context) {
        Response inner
            = this.serviceClient().addWithResponse(workspaceId, resourceId, body, context);
        if (inner != null) {
            return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
                new RulesResultsImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public RulesResults add(String workspaceId, String resourceId) {
        RulesResultsInner inner = this.serviceClient().add(workspaceId, resourceId);
        if (inner != null) {
            return new RulesResultsImpl(inner, this.manager());
        } else {
            return null;
        }
    }

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

    private com.azure.resourcemanager.security.SecurityManager manager() {
        return this.serviceManager;
    }

    public RuleResultsImpl define(String name) {
        return new RuleResultsImpl(name, this.manager());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy