All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications Maven / Gradle / Ivy

Go to download

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.core.util.CoreUtils;
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 Application properties.
 */
@Fluent
public final class MsixPackageApplications implements JsonSerializable {
    /*
     * Package Application Id, found in appxmanifest.xml.
     */
    private String appId;

    /*
     * Description of Package Application.
     */
    private String description;

    /*
     * Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml.
     */
    private String appUserModelId;

    /*
     * User friendly name.
     */
    private String friendlyName;

    /*
     * User friendly name.
     */
    private String iconImageName;

    /*
     * the icon a 64 bit string as a byte array.
     */
    private byte[] rawIcon;

    /*
     * the icon a 64 bit string as a byte array.
     */
    private byte[] rawPng;

    /**
     * Creates an instance of MsixPackageApplications class.
     */
    public MsixPackageApplications() {
    }

    /**
     * Get the appId property: Package Application Id, found in appxmanifest.xml.
     * 
     * @return the appId value.
     */
    public String appId() {
        return this.appId;
    }

    /**
     * Set the appId property: Package Application Id, found in appxmanifest.xml.
     * 
     * @param appId the appId value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withAppId(String appId) {
        this.appId = appId;
        return this;
    }

    /**
     * Get the description property: Description of Package Application.
     * 
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: Description of Package Application.
     * 
     * @param description the description value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the appUserModelId property: Used to activate Package Application. Consists of Package Name and
     * ApplicationID. Found in appxmanifest.xml.
     * 
     * @return the appUserModelId value.
     */
    public String appUserModelId() {
        return this.appUserModelId;
    }

    /**
     * Set the appUserModelId property: Used to activate Package Application. Consists of Package Name and
     * ApplicationID. Found in appxmanifest.xml.
     * 
     * @param appUserModelId the appUserModelId value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withAppUserModelId(String appUserModelId) {
        this.appUserModelId = appUserModelId;
        return this;
    }

    /**
     * Get the friendlyName property: User friendly name.
     * 
     * @return the friendlyName value.
     */
    public String friendlyName() {
        return this.friendlyName;
    }

    /**
     * Set the friendlyName property: User friendly name.
     * 
     * @param friendlyName the friendlyName value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withFriendlyName(String friendlyName) {
        this.friendlyName = friendlyName;
        return this;
    }

    /**
     * Get the iconImageName property: User friendly name.
     * 
     * @return the iconImageName value.
     */
    public String iconImageName() {
        return this.iconImageName;
    }

    /**
     * Set the iconImageName property: User friendly name.
     * 
     * @param iconImageName the iconImageName value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withIconImageName(String iconImageName) {
        this.iconImageName = iconImageName;
        return this;
    }

    /**
     * Get the rawIcon property: the icon a 64 bit string as a byte array.
     * 
     * @return the rawIcon value.
     */
    public byte[] rawIcon() {
        return CoreUtils.clone(this.rawIcon);
    }

    /**
     * Set the rawIcon property: the icon a 64 bit string as a byte array.
     * 
     * @param rawIcon the rawIcon value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withRawIcon(byte[] rawIcon) {
        this.rawIcon = CoreUtils.clone(rawIcon);
        return this;
    }

    /**
     * Get the rawPng property: the icon a 64 bit string as a byte array.
     * 
     * @return the rawPng value.
     */
    public byte[] rawPng() {
        return CoreUtils.clone(this.rawPng);
    }

    /**
     * Set the rawPng property: the icon a 64 bit string as a byte array.
     * 
     * @param rawPng the rawPng value to set.
     * @return the MsixPackageApplications object itself.
     */
    public MsixPackageApplications withRawPng(byte[] rawPng) {
        this.rawPng = CoreUtils.clone(rawPng);
        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("appId", this.appId);
        jsonWriter.writeStringField("description", this.description);
        jsonWriter.writeStringField("appUserModelID", this.appUserModelId);
        jsonWriter.writeStringField("friendlyName", this.friendlyName);
        jsonWriter.writeStringField("iconImageName", this.iconImageName);
        jsonWriter.writeBinaryField("rawIcon", this.rawIcon);
        jsonWriter.writeBinaryField("rawPng", this.rawPng);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of MsixPackageApplications from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of MsixPackageApplications 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 MsixPackageApplications.
     */
    public static MsixPackageApplications fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            MsixPackageApplications deserializedMsixPackageApplications = new MsixPackageApplications();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("appId".equals(fieldName)) {
                    deserializedMsixPackageApplications.appId = reader.getString();
                } else if ("description".equals(fieldName)) {
                    deserializedMsixPackageApplications.description = reader.getString();
                } else if ("appUserModelID".equals(fieldName)) {
                    deserializedMsixPackageApplications.appUserModelId = reader.getString();
                } else if ("friendlyName".equals(fieldName)) {
                    deserializedMsixPackageApplications.friendlyName = reader.getString();
                } else if ("iconImageName".equals(fieldName)) {
                    deserializedMsixPackageApplications.iconImageName = reader.getString();
                } else if ("rawIcon".equals(fieldName)) {
                    deserializedMsixPackageApplications.rawIcon = reader.getBinary();
                } else if ("rawPng".equals(fieldName)) {
                    deserializedMsixPackageApplications.rawPng = reader.getBinary();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedMsixPackageApplications;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy