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

com.azure.resourcemanager.hybridcompute.models.LicenseUpdate Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.

There is a newer version: 1.1.0-beta.1
Show 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.hybridcompute.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdateProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/**
 * Describes a License Update.
 */
@Fluent
public final class LicenseUpdate extends ResourceUpdate {
    /*
     * License Update properties
     */
    @JsonProperty(value = "properties")
    private LicenseUpdateProperties innerProperties;

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

    /**
     * Get the innerProperties property: License Update properties.
     * 
     * @return the innerProperties value.
     */
    private LicenseUpdateProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LicenseUpdate withTags(Map tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the licenseType property: The type of the license resource.
     * 
     * @return the licenseType value.
     */
    public LicenseType licenseType() {
        return this.innerProperties() == null ? null : this.innerProperties().licenseType();
    }

    /**
     * Set the licenseType property: The type of the license resource.
     * 
     * @param licenseType the licenseType value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withLicenseType(LicenseType licenseType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withLicenseType(licenseType);
        return this;
    }

    /**
     * Get the state property: Describes the state of the license.
     * 
     * @return the state value.
     */
    public LicenseState state() {
        return this.innerProperties() == null ? null : this.innerProperties().state();
    }

    /**
     * Set the state property: Describes the state of the license.
     * 
     * @param state the state value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withState(LicenseState state) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withState(state);
        return this;
    }

    /**
     * Get the target property: Describes the license target server.
     * 
     * @return the target value.
     */
    public LicenseTarget target() {
        return this.innerProperties() == null ? null : this.innerProperties().target();
    }

    /**
     * Set the target property: Describes the license target server.
     * 
     * @param target the target value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withTarget(LicenseTarget target) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withTarget(target);
        return this;
    }

    /**
     * Get the edition property: Describes the edition of the license. The values are either Standard or Datacenter.
     * 
     * @return the edition value.
     */
    public LicenseEdition edition() {
        return this.innerProperties() == null ? null : this.innerProperties().edition();
    }

    /**
     * Set the edition property: Describes the edition of the license. The values are either Standard or Datacenter.
     * 
     * @param edition the edition value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withEdition(LicenseEdition edition) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withEdition(edition);
        return this;
    }

    /**
     * Get the type property: Describes the license core type (pCore or vCore).
     * 
     * @return the type value.
     */
    public LicenseCoreType type() {
        return this.innerProperties() == null ? null : this.innerProperties().type();
    }

    /**
     * Set the type property: Describes the license core type (pCore or vCore).
     * 
     * @param type the type value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withType(LicenseCoreType type) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withType(type);
        return this;
    }

    /**
     * Get the processors property: Describes the number of processors.
     * 
     * @return the processors value.
     */
    public Integer processors() {
        return this.innerProperties() == null ? null : this.innerProperties().processors();
    }

    /**
     * Set the processors property: Describes the number of processors.
     * 
     * @param processors the processors value to set.
     * @return the LicenseUpdate object itself.
     */
    public LicenseUpdate withProcessors(Integer processors) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LicenseUpdateProperties();
        }
        this.innerProperties().withProcessors(processors);
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy