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

com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/**
 * Base class for backup item. Workload-specific backup items are derived from this class.
 */
@Fluent
public final class WorkloadProtectableItemResourceInner extends Resource {
    /*
     * WorkloadProtectableItemResource properties
     */
    @JsonProperty(value = "properties")
    private WorkloadProtectableItem properties;

    /*
     * Optional ETag.
     */
    @JsonProperty(value = "eTag")
    private String etag;

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

    /**
     * Get the properties property: WorkloadProtectableItemResource properties.
     * 
     * @return the properties value.
     */
    public WorkloadProtectableItem properties() {
        return this.properties;
    }

    /**
     * Set the properties property: WorkloadProtectableItemResource properties.
     * 
     * @param properties the properties value to set.
     * @return the WorkloadProtectableItemResourceInner object itself.
     */
    public WorkloadProtectableItemResourceInner withProperties(WorkloadProtectableItem properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the etag property: Optional ETag.
     * 
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Set the etag property: Optional ETag.
     * 
     * @param etag the etag value to set.
     * @return the WorkloadProtectableItemResourceInner object itself.
     */
    public WorkloadProtectableItemResourceInner withEtag(String etag) {
        this.etag = etag;
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public WorkloadProtectableItemResourceInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy