com.azure.resourcemanager.security.models.UpdateIotSecuritySolutionData 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.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.security.fluent.models.UpdateIoTSecuritySolutionProperties;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* The UpdateIotSecuritySolutionData model.
*/
@Fluent
public final class UpdateIotSecuritySolutionData extends TagsResource {
/*
* Security Solution data
*/
private UpdateIoTSecuritySolutionProperties innerProperties;
/**
* Creates an instance of UpdateIotSecuritySolutionData class.
*/
public UpdateIotSecuritySolutionData() {
}
/**
* Get the innerProperties property: Security Solution data.
*
* @return the innerProperties value.
*/
private UpdateIoTSecuritySolutionProperties innerProperties() {
return this.innerProperties;
}
/**
* {@inheritDoc}
*/
@Override
public UpdateIotSecuritySolutionData withTags(Map tags) {
super.withTags(tags);
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.innerProperties() == null ? null : this.innerProperties().userDefinedResources();
}
/**
* Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
*
* @param userDefinedResources the userDefinedResources value to set.
* @return the UpdateIotSecuritySolutionData object itself.
*/
public UpdateIotSecuritySolutionData withUserDefinedResources(UserDefinedResourcesProperties userDefinedResources) {
if (this.innerProperties() == null) {
this.innerProperties = new UpdateIoTSecuritySolutionProperties();
}
this.innerProperties().withUserDefinedResources(userDefinedResources);
return this;
}
/**
* Get the recommendationsConfiguration property: List of the configuration status for each recommendation type.
*
* @return the recommendationsConfiguration value.
*/
public List recommendationsConfiguration() {
return this.innerProperties() == null ? null : this.innerProperties().recommendationsConfiguration();
}
/**
* Set the recommendationsConfiguration property: List of the configuration status for each recommendation type.
*
* @param recommendationsConfiguration the recommendationsConfiguration value to set.
* @return the UpdateIotSecuritySolutionData object itself.
*/
public UpdateIotSecuritySolutionData
withRecommendationsConfiguration(List recommendationsConfiguration) {
if (this.innerProperties() == null) {
this.innerProperties = new UpdateIoTSecuritySolutionProperties();
}
this.innerProperties().withRecommendationsConfiguration(recommendationsConfiguration);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of UpdateIotSecuritySolutionData from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of UpdateIotSecuritySolutionData if the JsonReader was pointing to an instance of it, or null
* if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the UpdateIotSecuritySolutionData.
*/
public static UpdateIotSecuritySolutionData fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
UpdateIotSecuritySolutionData deserializedUpdateIotSecuritySolutionData
= new UpdateIotSecuritySolutionData();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedUpdateIotSecuritySolutionData.withTags(tags);
} else if ("properties".equals(fieldName)) {
deserializedUpdateIotSecuritySolutionData.innerProperties
= UpdateIoTSecuritySolutionProperties.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedUpdateIotSecuritySolutionData;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy