com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner 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.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.security.models.AllowlistCustomAlertRule;
import com.azure.resourcemanager.security.models.DenylistCustomAlertRule;
import com.azure.resourcemanager.security.models.ThresholdCustomAlertRule;
import com.azure.resourcemanager.security.models.TimeWindowCustomAlertRule;
import java.io.IOException;
import java.util.List;
/**
* The device security group resource.
*/
@Fluent
public final class DeviceSecurityGroupInner extends ProxyResource {
/*
* Device Security group data
*/
private DeviceSecurityGroupProperties innerProperties;
/*
* The type of the resource.
*/
private String type;
/*
* The name of the resource.
*/
private String name;
/*
* Fully qualified resource Id for the resource.
*/
private String id;
/**
* Creates an instance of DeviceSecurityGroupInner class.
*/
public DeviceSecurityGroupInner() {
}
/**
* Get the innerProperties property: Device Security group data.
*
* @return the innerProperties value.
*/
private DeviceSecurityGroupProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the type property: The type of the resource.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the name property: The name of the resource.
*
* @return the name value.
*/
@Override
public String name() {
return this.name;
}
/**
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
@Override
public String id() {
return this.id;
}
/**
* Get the thresholdRules property: The list of custom alert threshold rules.
*
* @return the thresholdRules value.
*/
public List thresholdRules() {
return this.innerProperties() == null ? null : this.innerProperties().thresholdRules();
}
/**
* Set the thresholdRules property: The list of custom alert threshold rules.
*
* @param thresholdRules the thresholdRules value to set.
* @return the DeviceSecurityGroupInner object itself.
*/
public DeviceSecurityGroupInner withThresholdRules(List thresholdRules) {
if (this.innerProperties() == null) {
this.innerProperties = new DeviceSecurityGroupProperties();
}
this.innerProperties().withThresholdRules(thresholdRules);
return this;
}
/**
* Get the timeWindowRules property: The list of custom alert time-window rules.
*
* @return the timeWindowRules value.
*/
public List timeWindowRules() {
return this.innerProperties() == null ? null : this.innerProperties().timeWindowRules();
}
/**
* Set the timeWindowRules property: The list of custom alert time-window rules.
*
* @param timeWindowRules the timeWindowRules value to set.
* @return the DeviceSecurityGroupInner object itself.
*/
public DeviceSecurityGroupInner withTimeWindowRules(List timeWindowRules) {
if (this.innerProperties() == null) {
this.innerProperties = new DeviceSecurityGroupProperties();
}
this.innerProperties().withTimeWindowRules(timeWindowRules);
return this;
}
/**
* Get the allowlistRules property: The allow-list custom alert rules.
*
* @return the allowlistRules value.
*/
public List allowlistRules() {
return this.innerProperties() == null ? null : this.innerProperties().allowlistRules();
}
/**
* Set the allowlistRules property: The allow-list custom alert rules.
*
* @param allowlistRules the allowlistRules value to set.
* @return the DeviceSecurityGroupInner object itself.
*/
public DeviceSecurityGroupInner withAllowlistRules(List allowlistRules) {
if (this.innerProperties() == null) {
this.innerProperties = new DeviceSecurityGroupProperties();
}
this.innerProperties().withAllowlistRules(allowlistRules);
return this;
}
/**
* Get the denylistRules property: The deny-list custom alert rules.
*
* @return the denylistRules value.
*/
public List denylistRules() {
return this.innerProperties() == null ? null : this.innerProperties().denylistRules();
}
/**
* Set the denylistRules property: The deny-list custom alert rules.
*
* @param denylistRules the denylistRules value to set.
* @return the DeviceSecurityGroupInner object itself.
*/
public DeviceSecurityGroupInner withDenylistRules(List denylistRules) {
if (this.innerProperties() == null) {
this.innerProperties = new DeviceSecurityGroupProperties();
}
this.innerProperties().withDenylistRules(denylistRules);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DeviceSecurityGroupInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DeviceSecurityGroupInner if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the DeviceSecurityGroupInner.
*/
public static DeviceSecurityGroupInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DeviceSecurityGroupInner deserializedDeviceSecurityGroupInner = new DeviceSecurityGroupInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedDeviceSecurityGroupInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedDeviceSecurityGroupInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedDeviceSecurityGroupInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedDeviceSecurityGroupInner.innerProperties
= DeviceSecurityGroupProperties.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedDeviceSecurityGroupInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy