![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemProperties 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;
/**
* Schema for StartMenuItem properties.
*/
@Fluent
public final class StartMenuItemProperties implements JsonSerializable {
/*
* Alias of StartMenuItem.
*/
private String appAlias;
/*
* Path to the file of StartMenuItem.
*/
private String filePath;
/*
* Command line arguments for StartMenuItem.
*/
private String commandLineArguments;
/*
* Path to the icon.
*/
private String iconPath;
/*
* Index of the icon.
*/
private Integer iconIndex;
/**
* Creates an instance of StartMenuItemProperties class.
*/
public StartMenuItemProperties() {
}
/**
* Get the appAlias property: Alias of StartMenuItem.
*
* @return the appAlias value.
*/
public String appAlias() {
return this.appAlias;
}
/**
* Set the appAlias property: Alias of StartMenuItem.
*
* @param appAlias the appAlias value to set.
* @return the StartMenuItemProperties object itself.
*/
public StartMenuItemProperties withAppAlias(String appAlias) {
this.appAlias = appAlias;
return this;
}
/**
* Get the filePath property: Path to the file of StartMenuItem.
*
* @return the filePath value.
*/
public String filePath() {
return this.filePath;
}
/**
* Set the filePath property: Path to the file of StartMenuItem.
*
* @param filePath the filePath value to set.
* @return the StartMenuItemProperties object itself.
*/
public StartMenuItemProperties withFilePath(String filePath) {
this.filePath = filePath;
return this;
}
/**
* Get the commandLineArguments property: Command line arguments for StartMenuItem.
*
* @return the commandLineArguments value.
*/
public String commandLineArguments() {
return this.commandLineArguments;
}
/**
* Set the commandLineArguments property: Command line arguments for StartMenuItem.
*
* @param commandLineArguments the commandLineArguments value to set.
* @return the StartMenuItemProperties object itself.
*/
public StartMenuItemProperties withCommandLineArguments(String commandLineArguments) {
this.commandLineArguments = commandLineArguments;
return this;
}
/**
* Get the iconPath property: Path to the icon.
*
* @return the iconPath value.
*/
public String iconPath() {
return this.iconPath;
}
/**
* Set the iconPath property: Path to the icon.
*
* @param iconPath the iconPath value to set.
* @return the StartMenuItemProperties object itself.
*/
public StartMenuItemProperties withIconPath(String iconPath) {
this.iconPath = iconPath;
return this;
}
/**
* Get the iconIndex property: Index of the icon.
*
* @return the iconIndex value.
*/
public Integer iconIndex() {
return this.iconIndex;
}
/**
* Set the iconIndex property: Index of the icon.
*
* @param iconIndex the iconIndex value to set.
* @return the StartMenuItemProperties object itself.
*/
public StartMenuItemProperties withIconIndex(Integer iconIndex) {
this.iconIndex = iconIndex;
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("appAlias", this.appAlias);
jsonWriter.writeStringField("filePath", this.filePath);
jsonWriter.writeStringField("commandLineArguments", this.commandLineArguments);
jsonWriter.writeStringField("iconPath", this.iconPath);
jsonWriter.writeNumberField("iconIndex", this.iconIndex);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of StartMenuItemProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of StartMenuItemProperties 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 StartMenuItemProperties.
*/
public static StartMenuItemProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
StartMenuItemProperties deserializedStartMenuItemProperties = new StartMenuItemProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("appAlias".equals(fieldName)) {
deserializedStartMenuItemProperties.appAlias = reader.getString();
} else if ("filePath".equals(fieldName)) {
deserializedStartMenuItemProperties.filePath = reader.getString();
} else if ("commandLineArguments".equals(fieldName)) {
deserializedStartMenuItemProperties.commandLineArguments = reader.getString();
} else if ("iconPath".equals(fieldName)) {
deserializedStartMenuItemProperties.iconPath = reader.getString();
} else if ("iconIndex".equals(fieldName)) {
deserializedStartMenuItemProperties.iconIndex = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedStartMenuItemProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy