com.azure.resourcemanager.security.implementation.DefenderForStorageSettingImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-security Show documentation
Show all versions of azure-resourcemanager-security Show documentation
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.
// 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.util.Context;
import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner;
import com.azure.resourcemanager.security.models.DefenderForStorageSetting;
import com.azure.resourcemanager.security.models.DefenderForStorageSettingProperties;
import com.azure.resourcemanager.security.models.MalwareScan;
import com.azure.resourcemanager.security.models.SettingName;
public final class DefenderForStorageSettingImpl
implements DefenderForStorageSetting, DefenderForStorageSetting.Definition {
private DefenderForStorageSettingInner innerObject;
private final com.azure.resourcemanager.security.SecurityManager serviceManager;
DefenderForStorageSettingImpl(DefenderForStorageSettingInner innerObject,
com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public DefenderForStorageSettingProperties properties() {
return this.innerModel().properties();
}
public DefenderForStorageSettingInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.security.SecurityManager manager() {
return this.serviceManager;
}
private String resourceId;
private SettingName settingName;
public DefenderForStorageSettingImpl withExistingResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
public DefenderForStorageSetting create() {
this.innerObject = serviceManager.serviceClient()
.getDefenderForStorages()
.createWithResponse(resourceId, settingName, this.innerModel(), Context.NONE)
.getValue();
return this;
}
public DefenderForStorageSetting create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getDefenderForStorages()
.createWithResponse(resourceId, settingName, this.innerModel(), context)
.getValue();
return this;
}
DefenderForStorageSettingImpl(SettingName name, com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = new DefenderForStorageSettingInner();
this.serviceManager = serviceManager;
this.settingName = name;
}
public DefenderForStorageSetting refresh() {
this.innerObject = serviceManager.serviceClient()
.getDefenderForStorages()
.getWithResponse(resourceId, settingName, Context.NONE)
.getValue();
return this;
}
public DefenderForStorageSetting refresh(Context context) {
this.innerObject = serviceManager.serviceClient()
.getDefenderForStorages()
.getWithResponse(resourceId, settingName, context)
.getValue();
return this;
}
public Response startMalwareScanWithResponse(Context context) {
return serviceManager.defenderForStorages().startMalwareScanWithResponse(resourceId, settingName, context);
}
public MalwareScan startMalwareScan() {
return serviceManager.defenderForStorages().startMalwareScan(resourceId, settingName);
}
public DefenderForStorageSettingImpl withProperties(DefenderForStorageSettingProperties properties) {
this.innerModel().withProperties(properties);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy