com.azure.resourcemanager.security.fluent.models.SoftwareProperties 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.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.security.models.EndOfSupportStatus;
import java.io.IOException;
/**
* Software Inventory resource properties.
*/
@Fluent
public final class SoftwareProperties implements JsonSerializable {
/*
* Unique identifier for the virtual machine in the service.
*/
private String deviceId;
/*
* Platform of the operating system running on the device.
*/
private String osPlatform;
/*
* Name of the software vendor.
*/
private String vendor;
/*
* Name of the software product.
*/
private String softwareName;
/*
* Version number of the software product.
*/
private String version;
/*
* End of support status.
*/
private EndOfSupportStatus endOfSupportStatus;
/*
* The end of support date in case the product is upcoming end of support.
*/
private String endOfSupportDate;
/*
* Number of weaknesses.
*/
private Integer numberOfKnownVulnerabilities;
/*
* First time that the software was seen in the device.
*/
private String firstSeenAt;
/**
* Creates an instance of SoftwareProperties class.
*/
public SoftwareProperties() {
}
/**
* Get the deviceId property: Unique identifier for the virtual machine in the service.
*
* @return the deviceId value.
*/
public String deviceId() {
return this.deviceId;
}
/**
* Set the deviceId property: Unique identifier for the virtual machine in the service.
*
* @param deviceId the deviceId value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withDeviceId(String deviceId) {
this.deviceId = deviceId;
return this;
}
/**
* Get the osPlatform property: Platform of the operating system running on the device.
*
* @return the osPlatform value.
*/
public String osPlatform() {
return this.osPlatform;
}
/**
* Set the osPlatform property: Platform of the operating system running on the device.
*
* @param osPlatform the osPlatform value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withOsPlatform(String osPlatform) {
this.osPlatform = osPlatform;
return this;
}
/**
* Get the vendor property: Name of the software vendor.
*
* @return the vendor value.
*/
public String vendor() {
return this.vendor;
}
/**
* Set the vendor property: Name of the software vendor.
*
* @param vendor the vendor value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withVendor(String vendor) {
this.vendor = vendor;
return this;
}
/**
* Get the softwareName property: Name of the software product.
*
* @return the softwareName value.
*/
public String softwareName() {
return this.softwareName;
}
/**
* Set the softwareName property: Name of the software product.
*
* @param softwareName the softwareName value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withSoftwareName(String softwareName) {
this.softwareName = softwareName;
return this;
}
/**
* Get the version property: Version number of the software product.
*
* @return the version value.
*/
public String version() {
return this.version;
}
/**
* Set the version property: Version number of the software product.
*
* @param version the version value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withVersion(String version) {
this.version = version;
return this;
}
/**
* Get the endOfSupportStatus property: End of support status.
*
* @return the endOfSupportStatus value.
*/
public EndOfSupportStatus endOfSupportStatus() {
return this.endOfSupportStatus;
}
/**
* Set the endOfSupportStatus property: End of support status.
*
* @param endOfSupportStatus the endOfSupportStatus value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withEndOfSupportStatus(EndOfSupportStatus endOfSupportStatus) {
this.endOfSupportStatus = endOfSupportStatus;
return this;
}
/**
* Get the endOfSupportDate property: The end of support date in case the product is upcoming end of support.
*
* @return the endOfSupportDate value.
*/
public String endOfSupportDate() {
return this.endOfSupportDate;
}
/**
* Set the endOfSupportDate property: The end of support date in case the product is upcoming end of support.
*
* @param endOfSupportDate the endOfSupportDate value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withEndOfSupportDate(String endOfSupportDate) {
this.endOfSupportDate = endOfSupportDate;
return this;
}
/**
* Get the numberOfKnownVulnerabilities property: Number of weaknesses.
*
* @return the numberOfKnownVulnerabilities value.
*/
public Integer numberOfKnownVulnerabilities() {
return this.numberOfKnownVulnerabilities;
}
/**
* Set the numberOfKnownVulnerabilities property: Number of weaknesses.
*
* @param numberOfKnownVulnerabilities the numberOfKnownVulnerabilities value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withNumberOfKnownVulnerabilities(Integer numberOfKnownVulnerabilities) {
this.numberOfKnownVulnerabilities = numberOfKnownVulnerabilities;
return this;
}
/**
* Get the firstSeenAt property: First time that the software was seen in the device.
*
* @return the firstSeenAt value.
*/
public String firstSeenAt() {
return this.firstSeenAt;
}
/**
* Set the firstSeenAt property: First time that the software was seen in the device.
*
* @param firstSeenAt the firstSeenAt value to set.
* @return the SoftwareProperties object itself.
*/
public SoftwareProperties withFirstSeenAt(String firstSeenAt) {
this.firstSeenAt = firstSeenAt;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("deviceId", this.deviceId);
jsonWriter.writeStringField("osPlatform", this.osPlatform);
jsonWriter.writeStringField("vendor", this.vendor);
jsonWriter.writeStringField("softwareName", this.softwareName);
jsonWriter.writeStringField("version", this.version);
jsonWriter.writeStringField("endOfSupportStatus",
this.endOfSupportStatus == null ? null : this.endOfSupportStatus.toString());
jsonWriter.writeStringField("endOfSupportDate", this.endOfSupportDate);
jsonWriter.writeNumberField("numberOfKnownVulnerabilities", this.numberOfKnownVulnerabilities);
jsonWriter.writeStringField("firstSeenAt", this.firstSeenAt);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SoftwareProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SoftwareProperties 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 SoftwareProperties.
*/
public static SoftwareProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SoftwareProperties deserializedSoftwareProperties = new SoftwareProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("deviceId".equals(fieldName)) {
deserializedSoftwareProperties.deviceId = reader.getString();
} else if ("osPlatform".equals(fieldName)) {
deserializedSoftwareProperties.osPlatform = reader.getString();
} else if ("vendor".equals(fieldName)) {
deserializedSoftwareProperties.vendor = reader.getString();
} else if ("softwareName".equals(fieldName)) {
deserializedSoftwareProperties.softwareName = reader.getString();
} else if ("version".equals(fieldName)) {
deserializedSoftwareProperties.version = reader.getString();
} else if ("endOfSupportStatus".equals(fieldName)) {
deserializedSoftwareProperties.endOfSupportStatus
= EndOfSupportStatus.fromString(reader.getString());
} else if ("endOfSupportDate".equals(fieldName)) {
deserializedSoftwareProperties.endOfSupportDate = reader.getString();
} else if ("numberOfKnownVulnerabilities".equals(fieldName)) {
deserializedSoftwareProperties.numberOfKnownVulnerabilities
= reader.getNullable(JsonReader::getInt);
} else if ("firstSeenAt".equals(fieldName)) {
deserializedSoftwareProperties.firstSeenAt = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedSoftwareProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy