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

package com.azure.resourcemanager.automation.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.automation.fluent.models.DeletedAutomationAccountProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Definition of the deleted automation account type. */
@Fluent
public final class DeletedAutomationAccount {
    /*
     * Gets or sets the automation account properties.
     */
    @JsonProperty(value = "properties")
    private DeletedAutomationAccountProperties innerProperties;

    /*
     * The resource id.
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * Gets or sets name of the resource.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The resource type.
     */
    @JsonProperty(value = "type")
    private String type;

    /*
     * Gets or sets the location of the resource.
     */
    @JsonProperty(value = "location")
    private String location;

    /**
     * Get the innerProperties property: Gets or sets the automation account properties.
     *
     * @return the innerProperties value.
     */
    private DeletedAutomationAccountProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the id property: The resource id.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: The resource id.
     *
     * @param id the id value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the name property: Gets or sets name of the resource.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Gets or sets name of the resource.
     *
     * @param name the name value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the type property: The resource type.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Set the type property: The resource type.
     *
     * @param type the type value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withType(String type) {
        this.type = type;
        return this;
    }

    /**
     * Get the location property: Gets or sets the location of the resource.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Set the location property: Gets or sets the location of the resource.
     *
     * @param location the location value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withLocation(String location) {
        this.location = location;
        return this;
    }

    /**
     * Get the automationAccountResourceId property: Gets or sets the Automation Account Resource Id.
     *
     * @return the automationAccountResourceId value.
     */
    public String automationAccountResourceId() {
        return this.innerProperties() == null ? null : this.innerProperties().automationAccountResourceId();
    }

    /**
     * Set the automationAccountResourceId property: Gets or sets the Automation Account Resource Id.
     *
     * @param automationAccountResourceId the automationAccountResourceId value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withAutomationAccountResourceId(String automationAccountResourceId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedAutomationAccountProperties();
        }
        this.innerProperties().withAutomationAccountResourceId(automationAccountResourceId);
        return this;
    }

    /**
     * Get the automationAccountId property: Gets or sets the Automation Account Id.
     *
     * @return the automationAccountId value.
     */
    public String automationAccountId() {
        return this.innerProperties() == null ? null : this.innerProperties().automationAccountId();
    }

    /**
     * Set the automationAccountId property: Gets or sets the Automation Account Id.
     *
     * @param automationAccountId the automationAccountId value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withAutomationAccountId(String automationAccountId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedAutomationAccountProperties();
        }
        this.innerProperties().withAutomationAccountId(automationAccountId);
        return this;
    }

    /**
     * Get the location property: Gets or sets the location of the resource.
     *
     * @return the location value.
     */
    public String locationPropertiesLocation() {
        return this.innerProperties() == null ? null : this.innerProperties().location();
    }

    /**
     * Set the location property: Gets or sets the location of the resource.
     *
     * @param location the location value to set.
     * @return the DeletedAutomationAccount object itself.
     */
    public DeletedAutomationAccount withLocationPropertiesLocation(String location) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedAutomationAccountProperties();
        }
        this.innerProperties().withLocation(location);
        return this;
    }

    /**
     * Get the deletionTime property: Gets the deletion time.
     *
     * @return the deletionTime value.
     */
    public OffsetDateTime deletionTime() {
        return this.innerProperties() == null ? null : this.innerProperties().deletionTime();
    }

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