tsp-output/@azure-tools/typespec-java/src/main/java/com/notificationhubs/models/Installation.java
<filename>tsp-output/@azure-tools/typespec-java/src/main/java/com/notificationhubs/models/Installation.java// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.notificationhubs.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
import java.util.Map;

/** Represents an Azure Notification Hubs Installation. */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.PROPERTY,
        property = "platform",
        defaultImpl = Installation.class)
@JsonTypeName("Installation")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "browser", value = BrowserInstallation.class),
    @JsonSubTypes.Type(name = "gcm", value = FcmLegacyInstallation.class)
})
@Fluent
public class Installation {
    /*
     * The installation ID
     */
    @JsonProperty(value = "installationId", required = true, access = JsonProperty.Access.WRITE_ONLY)
    private String installationId;

    /*
     * The user ID
     */
    @JsonProperty(value = "userId")
    private String userId;

    /*
     * The installation expiration time
     */
    @JsonProperty(value = "expirationTime", access = JsonProperty.Access.WRITE_ONLY)
    private String expirationTime;

    /*
     * The last updated date
     */
    @JsonProperty(value = "lastUpdate", access = JsonProperty.Access.WRITE_ONLY)
    private String lastUpdate;

    /*
     * The itags for the installation
     */
    @JsonProperty(value = "tags", required = true)
    private List<String> tags;

    /*
     * The templates for the installation
     */
    @JsonProperty(value = "templates", required = true)
    private Map<String, String> templates;

    /**
     * Creates an instance of Installation class.
     *
     * @param tags the tags value to set.
     * @param templates the templates value to set.
     */
    @JsonCreator
    public Installation(
            @JsonProperty(value = "tags", required = true) List<String> tags,
            @JsonProperty(value = "templates", required = true) Map<String, String> templates) {
        this.tags = tags;
        this.templates = templates;
    }

    /**
     * Get the installationId property: The installation ID.
     *
     * @return the installationId value.
     */
    public String getInstallationId() {
        return this.installationId;
    }

    /**
     * Get the userId property: The user ID.
     *
     * @return the userId value.
     */
    public String getUserId() {
        return this.userId;
    }

    /**
     * Set the userId property: The user ID.
     *
     * @param userId the userId value to set.
     * @return the Installation object itself.
     */
    public Installation setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    /**
     * Get the expirationTime property: The installation expiration time.
     *
     * @return the expirationTime value.
     */
    public String getExpirationTime() {
        return this.expirationTime;
    }

    /**
     * Get the lastUpdate property: The last updated date.
     *
     * @return the lastUpdate value.
     */
    public String getLastUpdate() {
        return this.lastUpdate;
    }

    /**
     * Get the tags property: The itags for the installation.
     *
     * @return the tags value.
     */
    public List<String> getTags() {
        return this.tags;
    }

    /**
     * Get the templates property: The templates for the installation.
     *
     * @return the templates value.
     */
    public Map<String, String> getTemplates() {
        return this.templates;
    }
}
