![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies 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.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;
/**
* Schema for MSIX Package Dependencies properties.
*/
@Fluent
public final class MsixPackageDependencies implements JsonSerializable {
/*
* Name of package dependency.
*/
private String dependencyName;
/*
* Name of dependency publisher.
*/
private String publisher;
/*
* Dependency version required.
*/
private String minVersion;
/**
* Creates an instance of MsixPackageDependencies class.
*/
public MsixPackageDependencies() {
}
/**
* Get the dependencyName property: Name of package dependency.
*
* @return the dependencyName value.
*/
public String dependencyName() {
return this.dependencyName;
}
/**
* Set the dependencyName property: Name of package dependency.
*
* @param dependencyName the dependencyName value to set.
* @return the MsixPackageDependencies object itself.
*/
public MsixPackageDependencies withDependencyName(String dependencyName) {
this.dependencyName = dependencyName;
return this;
}
/**
* Get the publisher property: Name of dependency publisher.
*
* @return the publisher value.
*/
public String publisher() {
return this.publisher;
}
/**
* Set the publisher property: Name of dependency publisher.
*
* @param publisher the publisher value to set.
* @return the MsixPackageDependencies object itself.
*/
public MsixPackageDependencies withPublisher(String publisher) {
this.publisher = publisher;
return this;
}
/**
* Get the minVersion property: Dependency version required.
*
* @return the minVersion value.
*/
public String minVersion() {
return this.minVersion;
}
/**
* Set the minVersion property: Dependency version required.
*
* @param minVersion the minVersion value to set.
* @return the MsixPackageDependencies object itself.
*/
public MsixPackageDependencies withMinVersion(String minVersion) {
this.minVersion = minVersion;
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("dependencyName", this.dependencyName);
jsonWriter.writeStringField("publisher", this.publisher);
jsonWriter.writeStringField("minVersion", this.minVersion);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of MsixPackageDependencies from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of MsixPackageDependencies 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 MsixPackageDependencies.
*/
public static MsixPackageDependencies fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
MsixPackageDependencies deserializedMsixPackageDependencies = new MsixPackageDependencies();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("dependencyName".equals(fieldName)) {
deserializedMsixPackageDependencies.dependencyName = reader.getString();
} else if ("publisher".equals(fieldName)) {
deserializedMsixPackageDependencies.publisher = reader.getString();
} else if ("minVersion".equals(fieldName)) {
deserializedMsixPackageDependencies.minVersion = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedMsixPackageDependencies;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy