com.azure.resourcemanager.automation.models.DscMetaConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-automation Show documentation
Show all versions of azure-resourcemanager-automation Show documentation
This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2022-02-22.
The newest version!
// 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.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 java.io.IOException;
/**
* Definition of the DSC Meta Configuration.
*/
@Fluent
public final class DscMetaConfiguration implements JsonSerializable {
/*
* Gets or sets the ConfigurationModeFrequencyMins value of the meta configuration.
*/
private Integer configurationModeFrequencyMins;
/*
* Gets or sets the RebootNodeIfNeeded value of the meta configuration.
*/
private Boolean rebootNodeIfNeeded;
/*
* Gets or sets the ConfigurationMode value of the meta configuration.
*/
private String configurationMode;
/*
* Gets or sets the ActionAfterReboot value of the meta configuration.
*/
private String actionAfterReboot;
/*
* Gets or sets the CertificateId value of the meta configuration.
*/
private String certificateId;
/*
* Gets or sets the RefreshFrequencyMins value of the meta configuration.
*/
private Integer refreshFrequencyMins;
/*
* Gets or sets the AllowModuleOverwrite value of the meta configuration.
*/
private Boolean allowModuleOverwrite;
/**
* Creates an instance of DscMetaConfiguration class.
*/
public DscMetaConfiguration() {
}
/**
* Get the configurationModeFrequencyMins property: Gets or sets the ConfigurationModeFrequencyMins value of the
* meta configuration.
*
* @return the configurationModeFrequencyMins value.
*/
public Integer configurationModeFrequencyMins() {
return this.configurationModeFrequencyMins;
}
/**
* Set the configurationModeFrequencyMins property: Gets or sets the ConfigurationModeFrequencyMins value of the
* meta configuration.
*
* @param configurationModeFrequencyMins the configurationModeFrequencyMins value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withConfigurationModeFrequencyMins(Integer configurationModeFrequencyMins) {
this.configurationModeFrequencyMins = configurationModeFrequencyMins;
return this;
}
/**
* Get the rebootNodeIfNeeded property: Gets or sets the RebootNodeIfNeeded value of the meta configuration.
*
* @return the rebootNodeIfNeeded value.
*/
public Boolean rebootNodeIfNeeded() {
return this.rebootNodeIfNeeded;
}
/**
* Set the rebootNodeIfNeeded property: Gets or sets the RebootNodeIfNeeded value of the meta configuration.
*
* @param rebootNodeIfNeeded the rebootNodeIfNeeded value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withRebootNodeIfNeeded(Boolean rebootNodeIfNeeded) {
this.rebootNodeIfNeeded = rebootNodeIfNeeded;
return this;
}
/**
* Get the configurationMode property: Gets or sets the ConfigurationMode value of the meta configuration.
*
* @return the configurationMode value.
*/
public String configurationMode() {
return this.configurationMode;
}
/**
* Set the configurationMode property: Gets or sets the ConfigurationMode value of the meta configuration.
*
* @param configurationMode the configurationMode value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withConfigurationMode(String configurationMode) {
this.configurationMode = configurationMode;
return this;
}
/**
* Get the actionAfterReboot property: Gets or sets the ActionAfterReboot value of the meta configuration.
*
* @return the actionAfterReboot value.
*/
public String actionAfterReboot() {
return this.actionAfterReboot;
}
/**
* Set the actionAfterReboot property: Gets or sets the ActionAfterReboot value of the meta configuration.
*
* @param actionAfterReboot the actionAfterReboot value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withActionAfterReboot(String actionAfterReboot) {
this.actionAfterReboot = actionAfterReboot;
return this;
}
/**
* Get the certificateId property: Gets or sets the CertificateId value of the meta configuration.
*
* @return the certificateId value.
*/
public String certificateId() {
return this.certificateId;
}
/**
* Set the certificateId property: Gets or sets the CertificateId value of the meta configuration.
*
* @param certificateId the certificateId value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withCertificateId(String certificateId) {
this.certificateId = certificateId;
return this;
}
/**
* Get the refreshFrequencyMins property: Gets or sets the RefreshFrequencyMins value of the meta configuration.
*
* @return the refreshFrequencyMins value.
*/
public Integer refreshFrequencyMins() {
return this.refreshFrequencyMins;
}
/**
* Set the refreshFrequencyMins property: Gets or sets the RefreshFrequencyMins value of the meta configuration.
*
* @param refreshFrequencyMins the refreshFrequencyMins value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withRefreshFrequencyMins(Integer refreshFrequencyMins) {
this.refreshFrequencyMins = refreshFrequencyMins;
return this;
}
/**
* Get the allowModuleOverwrite property: Gets or sets the AllowModuleOverwrite value of the meta configuration.
*
* @return the allowModuleOverwrite value.
*/
public Boolean allowModuleOverwrite() {
return this.allowModuleOverwrite;
}
/**
* Set the allowModuleOverwrite property: Gets or sets the AllowModuleOverwrite value of the meta configuration.
*
* @param allowModuleOverwrite the allowModuleOverwrite value to set.
* @return the DscMetaConfiguration object itself.
*/
public DscMetaConfiguration withAllowModuleOverwrite(Boolean allowModuleOverwrite) {
this.allowModuleOverwrite = allowModuleOverwrite;
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.writeNumberField("configurationModeFrequencyMins", this.configurationModeFrequencyMins);
jsonWriter.writeBooleanField("rebootNodeIfNeeded", this.rebootNodeIfNeeded);
jsonWriter.writeStringField("configurationMode", this.configurationMode);
jsonWriter.writeStringField("actionAfterReboot", this.actionAfterReboot);
jsonWriter.writeStringField("certificateId", this.certificateId);
jsonWriter.writeNumberField("refreshFrequencyMins", this.refreshFrequencyMins);
jsonWriter.writeBooleanField("allowModuleOverwrite", this.allowModuleOverwrite);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DscMetaConfiguration from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DscMetaConfiguration 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 DscMetaConfiguration.
*/
public static DscMetaConfiguration fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DscMetaConfiguration deserializedDscMetaConfiguration = new DscMetaConfiguration();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("configurationModeFrequencyMins".equals(fieldName)) {
deserializedDscMetaConfiguration.configurationModeFrequencyMins
= reader.getNullable(JsonReader::getInt);
} else if ("rebootNodeIfNeeded".equals(fieldName)) {
deserializedDscMetaConfiguration.rebootNodeIfNeeded = reader.getNullable(JsonReader::getBoolean);
} else if ("configurationMode".equals(fieldName)) {
deserializedDscMetaConfiguration.configurationMode = reader.getString();
} else if ("actionAfterReboot".equals(fieldName)) {
deserializedDscMetaConfiguration.actionAfterReboot = reader.getString();
} else if ("certificateId".equals(fieldName)) {
deserializedDscMetaConfiguration.certificateId = reader.getString();
} else if ("refreshFrequencyMins".equals(fieldName)) {
deserializedDscMetaConfiguration.refreshFrequencyMins = reader.getNullable(JsonReader::getInt);
} else if ("allowModuleOverwrite".equals(fieldName)) {
deserializedDscMetaConfiguration.allowModuleOverwrite = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}
return deserializedDscMetaConfiguration;
});
}
}