![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackagePatchProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-04.
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.desktopvirtualization.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 java.io.IOException;
/**
* MSIX Package properties that can be patched.
*/
@Fluent
public final class MsixPackagePatchProperties implements JsonSerializable {
/*
* Set a version of the package to be active across hostpool.
*/
private Boolean isActive;
/*
* Set Registration mode. Regular or Delayed.
*/
private Boolean isRegularRegistration;
/*
* Display name for MSIX Package.
*/
private String displayName;
/**
* Creates an instance of MsixPackagePatchProperties class.
*/
public MsixPackagePatchProperties() {
}
/**
* Get the isActive property: Set a version of the package to be active across hostpool.
*
* @return the isActive value.
*/
public Boolean isActive() {
return this.isActive;
}
/**
* Set the isActive property: Set a version of the package to be active across hostpool.
*
* @param isActive the isActive value to set.
* @return the MsixPackagePatchProperties object itself.
*/
public MsixPackagePatchProperties withIsActive(Boolean isActive) {
this.isActive = isActive;
return this;
}
/**
* Get the isRegularRegistration property: Set Registration mode. Regular or Delayed.
*
* @return the isRegularRegistration value.
*/
public Boolean isRegularRegistration() {
return this.isRegularRegistration;
}
/**
* Set the isRegularRegistration property: Set Registration mode. Regular or Delayed.
*
* @param isRegularRegistration the isRegularRegistration value to set.
* @return the MsixPackagePatchProperties object itself.
*/
public MsixPackagePatchProperties withIsRegularRegistration(Boolean isRegularRegistration) {
this.isRegularRegistration = isRegularRegistration;
return this;
}
/**
* Get the displayName property: Display name for MSIX Package.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Set the displayName property: Display name for MSIX Package.
*
* @param displayName the displayName value to set.
* @return the MsixPackagePatchProperties object itself.
*/
public MsixPackagePatchProperties withDisplayName(String displayName) {
this.displayName = displayName;
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.writeBooleanField("isActive", this.isActive);
jsonWriter.writeBooleanField("isRegularRegistration", this.isRegularRegistration);
jsonWriter.writeStringField("displayName", this.displayName);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of MsixPackagePatchProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of MsixPackagePatchProperties 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 MsixPackagePatchProperties.
*/
public static MsixPackagePatchProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
MsixPackagePatchProperties deserializedMsixPackagePatchProperties = new MsixPackagePatchProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("isActive".equals(fieldName)) {
deserializedMsixPackagePatchProperties.isActive = reader.getNullable(JsonReader::getBoolean);
} else if ("isRegularRegistration".equals(fieldName)) {
deserializedMsixPackagePatchProperties.isRegularRegistration
= reader.getNullable(JsonReader::getBoolean);
} else if ("displayName".equals(fieldName)) {
deserializedMsixPackagePatchProperties.displayName = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedMsixPackagePatchProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy