com.azure.resourcemanager.security.models.CefSolutionProperties 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 java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* The external security solution properties for CEF solutions.
*/
@Fluent
public final class CefSolutionProperties extends ExternalSecuritySolutionProperties {
/*
* The hostname property.
*/
private String hostname;
/*
* The agent property.
*/
private String agent;
/*
* The lastEventReceived property.
*/
private String lastEventReceived;
/**
* Creates an instance of CefSolutionProperties class.
*/
public CefSolutionProperties() {
}
/**
* Get the hostname property: The hostname property.
*
* @return the hostname value.
*/
public String hostname() {
return this.hostname;
}
/**
* Set the hostname property: The hostname property.
*
* @param hostname the hostname value to set.
* @return the CefSolutionProperties object itself.
*/
public CefSolutionProperties withHostname(String hostname) {
this.hostname = hostname;
return this;
}
/**
* Get the agent property: The agent property.
*
* @return the agent value.
*/
public String agent() {
return this.agent;
}
/**
* Set the agent property: The agent property.
*
* @param agent the agent value to set.
* @return the CefSolutionProperties object itself.
*/
public CefSolutionProperties withAgent(String agent) {
this.agent = agent;
return this;
}
/**
* Get the lastEventReceived property: The lastEventReceived property.
*
* @return the lastEventReceived value.
*/
public String lastEventReceived() {
return this.lastEventReceived;
}
/**
* Set the lastEventReceived property: The lastEventReceived property.
*
* @param lastEventReceived the lastEventReceived value to set.
* @return the CefSolutionProperties object itself.
*/
public CefSolutionProperties withLastEventReceived(String lastEventReceived) {
this.lastEventReceived = lastEventReceived;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public CefSolutionProperties withDeviceVendor(String deviceVendor) {
super.withDeviceVendor(deviceVendor);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public CefSolutionProperties withDeviceType(String deviceType) {
super.withDeviceType(deviceType);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public CefSolutionProperties withWorkspace(ConnectedWorkspace workspace) {
super.withWorkspace(workspace);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (workspace() != null) {
workspace().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("deviceVendor", deviceVendor());
jsonWriter.writeStringField("deviceType", deviceType());
jsonWriter.writeJsonField("workspace", workspace());
jsonWriter.writeStringField("hostname", this.hostname);
jsonWriter.writeStringField("agent", this.agent);
jsonWriter.writeStringField("lastEventReceived", this.lastEventReceived);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of CefSolutionProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of CefSolutionProperties 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 CefSolutionProperties.
*/
public static CefSolutionProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
CefSolutionProperties deserializedCefSolutionProperties = new CefSolutionProperties();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("deviceVendor".equals(fieldName)) {
deserializedCefSolutionProperties.withDeviceVendor(reader.getString());
} else if ("deviceType".equals(fieldName)) {
deserializedCefSolutionProperties.withDeviceType(reader.getString());
} else if ("workspace".equals(fieldName)) {
deserializedCefSolutionProperties.withWorkspace(ConnectedWorkspace.fromJson(reader));
} else if ("hostname".equals(fieldName)) {
deserializedCefSolutionProperties.hostname = reader.getString();
} else if ("agent".equals(fieldName)) {
deserializedCefSolutionProperties.agent = reader.getString();
} else if ("lastEventReceived".equals(fieldName)) {
deserializedCefSolutionProperties.lastEventReceived = reader.getString();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedCefSolutionProperties.withAdditionalProperties(additionalProperties);
return deserializedCefSolutionProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy