Location Class

  • java.lang.Object
    • com.azure.resourcemanager.deviceupdate.models.Location

Implements

public final class Location
implements JsonSerializable<Location>

The Location model.

Constructor Summary

Constructor Description
Location()

Creates an instance of Location class.

Method Summary

Modifier and Type Method and Description
static Location fromJson(JsonReader jsonReader)

Reads an instance of Location from the JsonReader.

String name()

Get the name property: The name property.

Role role()

Get the role property: Whether the location is primary or failover.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Location withName(String name)

Set the name property: The name property.

Location withRole(Role role)

Set the role property: Whether the location is primary or failover.

Methods inherited from java.lang.Object

Constructor Details

Location

public Location()

Creates an instance of Location class.

Method Details

fromJson

public static Location fromJson(JsonReader jsonReader)

Reads an instance of Location from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Location if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the Location.

name

public String name()

Get the name property: The name property.

Returns:

the name value.

role

public Role role()

Get the role property: Whether the location is primary or failover.

Returns:

the role value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withName

public Location withName(String name)

Set the name property: The name property.

Parameters:

name - the name value to set.

Returns:

the Location object itself.

withRole

public Location withRole(Role role)

Set the role property: Whether the location is primary or failover.

Parameters:

role - the role value to set.

Returns:

the Location object itself.

Applies to