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

package com.azure.resourcemanager.deviceupdate.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Location model. */
@Fluent
public final class Location {
    /*
     * The name property.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Whether the location is primary or failover
     */
    @JsonProperty(value = "role")
    private Role role;

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

    /**
     * Set the name property: The name property.
     *
     * @param name the name value to set.
     * @return the Location object itself.
     */
    public Location withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the role property: Whether the location is primary or failover.
     *
     * @return the role value.
     */
    public Role role() {
        return this.role;
    }

    /**
     * Set the role property: Whether the location is primary or failover.
     *
     * @param role the role value to set.
     * @return the Location object itself.
     */
    public Location withRole(Role role) {
        this.role = role;
        return this;
    }

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