com.azure.resourcemanager.security.fluent.models.SecuritySolutionsReferenceDataProperties 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.SecurityFamily;
import java.io.IOException;
/**
* The SecuritySolutionsReferenceDataProperties model.
*/
@Fluent
public final class SecuritySolutionsReferenceDataProperties
implements JsonSerializable {
/*
* The security family of the security solution
*/
private SecurityFamily securityFamily;
/*
* The security solutions' vendor name
*/
private String alertVendorName;
/*
* The security solutions' package info url
*/
private String packageInfoUrl;
/*
* The security solutions' product name
*/
private String productName;
/*
* The security solutions' publisher
*/
private String publisher;
/*
* The security solutions' publisher display name
*/
private String publisherDisplayName;
/*
* The security solutions' template
*/
private String template;
/**
* Creates an instance of SecuritySolutionsReferenceDataProperties class.
*/
public SecuritySolutionsReferenceDataProperties() {
}
/**
* Get the securityFamily property: The security family of the security solution.
*
* @return the securityFamily value.
*/
public SecurityFamily securityFamily() {
return this.securityFamily;
}
/**
* Set the securityFamily property: The security family of the security solution.
*
* @param securityFamily the securityFamily value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withSecurityFamily(SecurityFamily securityFamily) {
this.securityFamily = securityFamily;
return this;
}
/**
* Get the alertVendorName property: The security solutions' vendor name.
*
* @return the alertVendorName value.
*/
public String alertVendorName() {
return this.alertVendorName;
}
/**
* Set the alertVendorName property: The security solutions' vendor name.
*
* @param alertVendorName the alertVendorName value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withAlertVendorName(String alertVendorName) {
this.alertVendorName = alertVendorName;
return this;
}
/**
* Get the packageInfoUrl property: The security solutions' package info url.
*
* @return the packageInfoUrl value.
*/
public String packageInfoUrl() {
return this.packageInfoUrl;
}
/**
* Set the packageInfoUrl property: The security solutions' package info url.
*
* @param packageInfoUrl the packageInfoUrl value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withPackageInfoUrl(String packageInfoUrl) {
this.packageInfoUrl = packageInfoUrl;
return this;
}
/**
* Get the productName property: The security solutions' product name.
*
* @return the productName value.
*/
public String productName() {
return this.productName;
}
/**
* Set the productName property: The security solutions' product name.
*
* @param productName the productName value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withProductName(String productName) {
this.productName = productName;
return this;
}
/**
* Get the publisher property: The security solutions' publisher.
*
* @return the publisher value.
*/
public String publisher() {
return this.publisher;
}
/**
* Set the publisher property: The security solutions' publisher.
*
* @param publisher the publisher value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withPublisher(String publisher) {
this.publisher = publisher;
return this;
}
/**
* Get the publisherDisplayName property: The security solutions' publisher display name.
*
* @return the publisherDisplayName value.
*/
public String publisherDisplayName() {
return this.publisherDisplayName;
}
/**
* Set the publisherDisplayName property: The security solutions' publisher display name.
*
* @param publisherDisplayName the publisherDisplayName value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withPublisherDisplayName(String publisherDisplayName) {
this.publisherDisplayName = publisherDisplayName;
return this;
}
/**
* Get the template property: The security solutions' template.
*
* @return the template value.
*/
public String template() {
return this.template;
}
/**
* Set the template property: The security solutions' template.
*
* @param template the template value to set.
* @return the SecuritySolutionsReferenceDataProperties object itself.
*/
public SecuritySolutionsReferenceDataProperties withTemplate(String template) {
this.template = template;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (securityFamily() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property securityFamily in model SecuritySolutionsReferenceDataProperties"));
}
if (alertVendorName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property alertVendorName in model SecuritySolutionsReferenceDataProperties"));
}
if (packageInfoUrl() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property packageInfoUrl in model SecuritySolutionsReferenceDataProperties"));
}
if (productName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property productName in model SecuritySolutionsReferenceDataProperties"));
}
if (publisher() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property publisher in model SecuritySolutionsReferenceDataProperties"));
}
if (publisherDisplayName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property publisherDisplayName in model SecuritySolutionsReferenceDataProperties"));
}
if (template() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property template in model SecuritySolutionsReferenceDataProperties"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(SecuritySolutionsReferenceDataProperties.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("securityFamily",
this.securityFamily == null ? null : this.securityFamily.toString());
jsonWriter.writeStringField("alertVendorName", this.alertVendorName);
jsonWriter.writeStringField("packageInfoUrl", this.packageInfoUrl);
jsonWriter.writeStringField("productName", this.productName);
jsonWriter.writeStringField("publisher", this.publisher);
jsonWriter.writeStringField("publisherDisplayName", this.publisherDisplayName);
jsonWriter.writeStringField("template", this.template);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SecuritySolutionsReferenceDataProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SecuritySolutionsReferenceDataProperties 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 SecuritySolutionsReferenceDataProperties.
*/
public static SecuritySolutionsReferenceDataProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SecuritySolutionsReferenceDataProperties deserializedSecuritySolutionsReferenceDataProperties
= new SecuritySolutionsReferenceDataProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("securityFamily".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.securityFamily
= SecurityFamily.fromString(reader.getString());
} else if ("alertVendorName".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.alertVendorName = reader.getString();
} else if ("packageInfoUrl".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.packageInfoUrl = reader.getString();
} else if ("productName".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.productName = reader.getString();
} else if ("publisher".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.publisher = reader.getString();
} else if ("publisherDisplayName".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.publisherDisplayName = reader.getString();
} else if ("template".equals(fieldName)) {
deserializedSecuritySolutionsReferenceDataProperties.template = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedSecuritySolutionsReferenceDataProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy