![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.automation.fluent.models.SoftwareUpdateConfigurationRunProperties Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.automation.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.automation.models.SoftwareUpdateConfigurationRunTasks;
import com.azure.resourcemanager.automation.models.UpdateConfigurationNavigation;
import java.io.IOException;
import java.time.OffsetDateTime;
/**
* Software update configuration properties.
*/
@Fluent
public final class SoftwareUpdateConfigurationRunProperties
implements JsonSerializable {
/*
* software update configuration triggered this run
*/
private UpdateConfigurationNavigation softwareUpdateConfiguration;
/*
* Status of the software update configuration run.
*/
private String status;
/*
* Configured duration for the software update configuration run.
*/
private String configuredDuration;
/*
* Operating system target of the software update configuration triggered this run
*/
private String osType;
/*
* Start time of the software update configuration run.
*/
private OffsetDateTime startTime;
/*
* End time of the software update configuration run.
*/
private OffsetDateTime endTime;
/*
* Number of computers in the software update configuration run.
*/
private Integer computerCount;
/*
* Number of computers with failed status.
*/
private Integer failedCount;
/*
* Creation time of the resource, which only appears in the response.
*/
private OffsetDateTime creationTime;
/*
* CreatedBy property, which only appears in the response.
*/
private String createdBy;
/*
* Last time resource was modified, which only appears in the response.
*/
private OffsetDateTime lastModifiedTime;
/*
* LastModifiedBy property, which only appears in the response.
*/
private String lastModifiedBy;
/*
* Software update configuration tasks triggered in this run
*/
private SoftwareUpdateConfigurationRunTasks tasks;
/**
* Creates an instance of SoftwareUpdateConfigurationRunProperties class.
*/
public SoftwareUpdateConfigurationRunProperties() {
}
/**
* Get the softwareUpdateConfiguration property: software update configuration triggered this run.
*
* @return the softwareUpdateConfiguration value.
*/
public UpdateConfigurationNavigation softwareUpdateConfiguration() {
return this.softwareUpdateConfiguration;
}
/**
* Set the softwareUpdateConfiguration property: software update configuration triggered this run.
*
* @param softwareUpdateConfiguration the softwareUpdateConfiguration value to set.
* @return the SoftwareUpdateConfigurationRunProperties object itself.
*/
public SoftwareUpdateConfigurationRunProperties
withSoftwareUpdateConfiguration(UpdateConfigurationNavigation softwareUpdateConfiguration) {
this.softwareUpdateConfiguration = softwareUpdateConfiguration;
return this;
}
/**
* Get the status property: Status of the software update configuration run.
*
* @return the status value.
*/
public String status() {
return this.status;
}
/**
* Get the configuredDuration property: Configured duration for the software update configuration run.
*
* @return the configuredDuration value.
*/
public String configuredDuration() {
return this.configuredDuration;
}
/**
* Get the osType property: Operating system target of the software update configuration triggered this run.
*
* @return the osType value.
*/
public String osType() {
return this.osType;
}
/**
* Get the startTime property: Start time of the software update configuration run.
*
* @return the startTime value.
*/
public OffsetDateTime startTime() {
return this.startTime;
}
/**
* Get the endTime property: End time of the software update configuration run.
*
* @return the endTime value.
*/
public OffsetDateTime endTime() {
return this.endTime;
}
/**
* Get the computerCount property: Number of computers in the software update configuration run.
*
* @return the computerCount value.
*/
public Integer computerCount() {
return this.computerCount;
}
/**
* Get the failedCount property: Number of computers with failed status.
*
* @return the failedCount value.
*/
public Integer failedCount() {
return this.failedCount;
}
/**
* Get the creationTime property: Creation time of the resource, which only appears in the response.
*
* @return the creationTime value.
*/
public OffsetDateTime creationTime() {
return this.creationTime;
}
/**
* Get the createdBy property: CreatedBy property, which only appears in the response.
*
* @return the createdBy value.
*/
public String createdBy() {
return this.createdBy;
}
/**
* Get the lastModifiedTime property: Last time resource was modified, which only appears in the response.
*
* @return the lastModifiedTime value.
*/
public OffsetDateTime lastModifiedTime() {
return this.lastModifiedTime;
}
/**
* Get the lastModifiedBy property: LastModifiedBy property, which only appears in the response.
*
* @return the lastModifiedBy value.
*/
public String lastModifiedBy() {
return this.lastModifiedBy;
}
/**
* Get the tasks property: Software update configuration tasks triggered in this run.
*
* @return the tasks value.
*/
public SoftwareUpdateConfigurationRunTasks tasks() {
return this.tasks;
}
/**
* Set the tasks property: Software update configuration tasks triggered in this run.
*
* @param tasks the tasks value to set.
* @return the SoftwareUpdateConfigurationRunProperties object itself.
*/
public SoftwareUpdateConfigurationRunProperties withTasks(SoftwareUpdateConfigurationRunTasks tasks) {
this.tasks = tasks;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (softwareUpdateConfiguration() != null) {
softwareUpdateConfiguration().validate();
}
if (tasks() != null) {
tasks().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("softwareUpdateConfiguration", this.softwareUpdateConfiguration);
jsonWriter.writeJsonField("tasks", this.tasks);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SoftwareUpdateConfigurationRunProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SoftwareUpdateConfigurationRunProperties 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 SoftwareUpdateConfigurationRunProperties.
*/
public static SoftwareUpdateConfigurationRunProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SoftwareUpdateConfigurationRunProperties deserializedSoftwareUpdateConfigurationRunProperties
= new SoftwareUpdateConfigurationRunProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("softwareUpdateConfiguration".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.softwareUpdateConfiguration
= UpdateConfigurationNavigation.fromJson(reader);
} else if ("status".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.status = reader.getString();
} else if ("configuredDuration".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.configuredDuration = reader.getString();
} else if ("osType".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.osType = reader.getString();
} else if ("startTime".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.startTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("endTime".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.endTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("computerCount".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.computerCount
= reader.getNullable(JsonReader::getInt);
} else if ("failedCount".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.failedCount
= reader.getNullable(JsonReader::getInt);
} else if ("creationTime".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.creationTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("createdBy".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.createdBy = reader.getString();
} else if ("lastModifiedTime".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.lastModifiedTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("lastModifiedBy".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.lastModifiedBy = reader.getString();
} else if ("tasks".equals(fieldName)) {
deserializedSoftwareUpdateConfigurationRunProperties.tasks
= SoftwareUpdateConfigurationRunTasks.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedSoftwareUpdateConfigurationRunProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy