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

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

// 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.SensitivitySettingsClient;
import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner;
import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner;
import com.azure.resourcemanager.security.models.GetSensitivitySettingsListResponse;
import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponse;
import com.azure.resourcemanager.security.models.SensitivitySettings;
import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest;

public final class SensitivitySettingsImpl implements SensitivitySettings {
    private static final ClientLogger LOGGER = new ClientLogger(SensitivitySettingsImpl.class);

    private final SensitivitySettingsClient innerClient;

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

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

    public Response
        createOrUpdateWithResponse(UpdateSensitivitySettingsRequest sensitivitySettings, Context context) {
        Response inner
            = this.serviceClient().createOrUpdateWithResponse(sensitivitySettings, context);
        if (inner != null) {
            return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
                new GetSensitivitySettingsResponseImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public GetSensitivitySettingsResponse createOrUpdate(UpdateSensitivitySettingsRequest sensitivitySettings) {
        GetSensitivitySettingsResponseInner inner = this.serviceClient().createOrUpdate(sensitivitySettings);
        if (inner != null) {
            return new GetSensitivitySettingsResponseImpl(inner, this.manager());
        } else {
            return null;
        }
    }

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

    public GetSensitivitySettingsResponse get() {
        GetSensitivitySettingsResponseInner inner = this.serviceClient().get();
        if (inner != null) {
            return new GetSensitivitySettingsResponseImpl(inner, this.manager());
        } else {
            return null;
        }
    }

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

    public GetSensitivitySettingsListResponse list() {
        GetSensitivitySettingsListResponseInner inner = this.serviceClient().list();
        if (inner != null) {
            return new GetSensitivitySettingsListResponseImpl(inner, this.manager());
        } else {
            return null;
        }
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy