com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionProperties 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.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.security.models.AdditionalWorkspacesProperties;
import com.azure.resourcemanager.security.models.DataSource;
import com.azure.resourcemanager.security.models.ExportData;
import com.azure.resourcemanager.security.models.RecommendationConfigurationProperties;
import com.azure.resourcemanager.security.models.SecuritySolutionStatus;
import com.azure.resourcemanager.security.models.UnmaskedIpLoggingStatus;
import com.azure.resourcemanager.security.models.UserDefinedResourcesProperties;
import java.io.IOException;
import java.util.List;
/**
* Security Solution setting data.
*/
@Fluent
public final class IoTSecuritySolutionProperties implements JsonSerializable {
/*
* Workspace resource ID
*/
private String workspace;
/*
* Resource display name.
*/
private String displayName;
/*
* Status of the IoT Security solution.
*/
private SecuritySolutionStatus status;
/*
* List of additional options for exporting to workspace data.
*/
private List export;
/*
* Disabled data sources. Disabling these data sources compromises the system.
*/
private List disabledDataSources;
/*
* IoT Hub resource IDs
*/
private List iotHubs;
/*
* Properties of the IoT Security solution's user defined resources.
*/
private UserDefinedResourcesProperties userDefinedResources;
/*
* List of resources that were automatically discovered as relevant to the security solution.
*/
private List autoDiscoveredResources;
/*
* List of the configuration status for each recommendation type.
*/
private List recommendationsConfiguration;
/*
* Unmasked IP address logging status
*/
private UnmaskedIpLoggingStatus unmaskedIpLoggingStatus;
/*
* List of additional workspaces
*/
private List additionalWorkspaces;
/**
* Creates an instance of IoTSecuritySolutionProperties class.
*/
public IoTSecuritySolutionProperties() {
}
/**
* Get the workspace property: Workspace resource ID.
*
* @return the workspace value.
*/
public String workspace() {
return this.workspace;
}
/**
* Set the workspace property: Workspace resource ID.
*
* @param workspace the workspace value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withWorkspace(String workspace) {
this.workspace = workspace;
return this;
}
/**
* Get the displayName property: Resource display name.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Set the displayName property: Resource display name.
*
* @param displayName the displayName value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Get the status property: Status of the IoT Security solution.
*
* @return the status value.
*/
public SecuritySolutionStatus status() {
return this.status;
}
/**
* Set the status property: Status of the IoT Security solution.
*
* @param status the status value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withStatus(SecuritySolutionStatus status) {
this.status = status;
return this;
}
/**
* Get the export property: List of additional options for exporting to workspace data.
*
* @return the export value.
*/
public List export() {
return this.export;
}
/**
* Set the export property: List of additional options for exporting to workspace data.
*
* @param export the export value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withExport(List export) {
this.export = export;
return this;
}
/**
* Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system.
*
* @return the disabledDataSources value.
*/
public List disabledDataSources() {
return this.disabledDataSources;
}
/**
* Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system.
*
* @param disabledDataSources the disabledDataSources value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withDisabledDataSources(List disabledDataSources) {
this.disabledDataSources = disabledDataSources;
return this;
}
/**
* Get the iotHubs property: IoT Hub resource IDs.
*
* @return the iotHubs value.
*/
public List iotHubs() {
return this.iotHubs;
}
/**
* Set the iotHubs property: IoT Hub resource IDs.
*
* @param iotHubs the iotHubs value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withIotHubs(List iotHubs) {
this.iotHubs = iotHubs;
return this;
}
/**
* Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
*
* @return the userDefinedResources value.
*/
public UserDefinedResourcesProperties userDefinedResources() {
return this.userDefinedResources;
}
/**
* Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
*
* @param userDefinedResources the userDefinedResources value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withUserDefinedResources(UserDefinedResourcesProperties userDefinedResources) {
this.userDefinedResources = userDefinedResources;
return this;
}
/**
* Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to the
* security solution.
*
* @return the autoDiscoveredResources value.
*/
public List autoDiscoveredResources() {
return this.autoDiscoveredResources;
}
/**
* Get the recommendationsConfiguration property: List of the configuration status for each recommendation type.
*
* @return the recommendationsConfiguration value.
*/
public List recommendationsConfiguration() {
return this.recommendationsConfiguration;
}
/**
* Set the recommendationsConfiguration property: List of the configuration status for each recommendation type.
*
* @param recommendationsConfiguration the recommendationsConfiguration value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties
withRecommendationsConfiguration(List recommendationsConfiguration) {
this.recommendationsConfiguration = recommendationsConfiguration;
return this;
}
/**
* Get the unmaskedIpLoggingStatus property: Unmasked IP address logging status.
*
* @return the unmaskedIpLoggingStatus value.
*/
public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() {
return this.unmaskedIpLoggingStatus;
}
/**
* Set the unmaskedIpLoggingStatus property: Unmasked IP address logging status.
*
* @param unmaskedIpLoggingStatus the unmaskedIpLoggingStatus value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties withUnmaskedIpLoggingStatus(UnmaskedIpLoggingStatus unmaskedIpLoggingStatus) {
this.unmaskedIpLoggingStatus = unmaskedIpLoggingStatus;
return this;
}
/**
* Get the additionalWorkspaces property: List of additional workspaces.
*
* @return the additionalWorkspaces value.
*/
public List additionalWorkspaces() {
return this.additionalWorkspaces;
}
/**
* Set the additionalWorkspaces property: List of additional workspaces.
*
* @param additionalWorkspaces the additionalWorkspaces value to set.
* @return the IoTSecuritySolutionProperties object itself.
*/
public IoTSecuritySolutionProperties
withAdditionalWorkspaces(List additionalWorkspaces) {
this.additionalWorkspaces = additionalWorkspaces;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (displayName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property displayName in model IoTSecuritySolutionProperties"));
}
if (iotHubs() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property iotHubs in model IoTSecuritySolutionProperties"));
}
if (userDefinedResources() != null) {
userDefinedResources().validate();
}
if (recommendationsConfiguration() != null) {
recommendationsConfiguration().forEach(e -> e.validate());
}
if (additionalWorkspaces() != null) {
additionalWorkspaces().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(IoTSecuritySolutionProperties.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("displayName", this.displayName);
jsonWriter.writeArrayField("iotHubs", this.iotHubs, (writer, element) -> writer.writeString(element));
jsonWriter.writeStringField("workspace", this.workspace);
jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
jsonWriter.writeArrayField("export", this.export,
(writer, element) -> writer.writeString(element == null ? null : element.toString()));
jsonWriter.writeArrayField("disabledDataSources", this.disabledDataSources,
(writer, element) -> writer.writeString(element == null ? null : element.toString()));
jsonWriter.writeJsonField("userDefinedResources", this.userDefinedResources);
jsonWriter.writeArrayField("recommendationsConfiguration", this.recommendationsConfiguration,
(writer, element) -> writer.writeJson(element));
jsonWriter.writeStringField("unmaskedIpLoggingStatus",
this.unmaskedIpLoggingStatus == null ? null : this.unmaskedIpLoggingStatus.toString());
jsonWriter.writeArrayField("additionalWorkspaces", this.additionalWorkspaces,
(writer, element) -> writer.writeJson(element));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of IoTSecuritySolutionProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of IoTSecuritySolutionProperties 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 IoTSecuritySolutionProperties.
*/
public static IoTSecuritySolutionProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
IoTSecuritySolutionProperties deserializedIoTSecuritySolutionProperties
= new IoTSecuritySolutionProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("displayName".equals(fieldName)) {
deserializedIoTSecuritySolutionProperties.displayName = reader.getString();
} else if ("iotHubs".equals(fieldName)) {
List iotHubs = reader.readArray(reader1 -> reader1.getString());
deserializedIoTSecuritySolutionProperties.iotHubs = iotHubs;
} else if ("workspace".equals(fieldName)) {
deserializedIoTSecuritySolutionProperties.workspace = reader.getString();
} else if ("status".equals(fieldName)) {
deserializedIoTSecuritySolutionProperties.status
= SecuritySolutionStatus.fromString(reader.getString());
} else if ("export".equals(fieldName)) {
List export = reader.readArray(reader1 -> ExportData.fromString(reader1.getString()));
deserializedIoTSecuritySolutionProperties.export = export;
} else if ("disabledDataSources".equals(fieldName)) {
List disabledDataSources
= reader.readArray(reader1 -> DataSource.fromString(reader1.getString()));
deserializedIoTSecuritySolutionProperties.disabledDataSources = disabledDataSources;
} else if ("userDefinedResources".equals(fieldName)) {
deserializedIoTSecuritySolutionProperties.userDefinedResources
= UserDefinedResourcesProperties.fromJson(reader);
} else if ("autoDiscoveredResources".equals(fieldName)) {
List autoDiscoveredResources = reader.readArray(reader1 -> reader1.getString());
deserializedIoTSecuritySolutionProperties.autoDiscoveredResources = autoDiscoveredResources;
} else if ("recommendationsConfiguration".equals(fieldName)) {
List recommendationsConfiguration
= reader.readArray(reader1 -> RecommendationConfigurationProperties.fromJson(reader1));
deserializedIoTSecuritySolutionProperties.recommendationsConfiguration
= recommendationsConfiguration;
} else if ("unmaskedIpLoggingStatus".equals(fieldName)) {
deserializedIoTSecuritySolutionProperties.unmaskedIpLoggingStatus
= UnmaskedIpLoggingStatus.fromString(reader.getString());
} else if ("additionalWorkspaces".equals(fieldName)) {
List additionalWorkspaces
= reader.readArray(reader1 -> AdditionalWorkspacesProperties.fromJson(reader1));
deserializedIoTSecuritySolutionProperties.additionalWorkspaces = additionalWorkspaces;
} else {
reader.skipChildren();
}
}
return deserializedIoTSecuritySolutionProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy