你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Region Class

  • java.lang.Object
    • com.azure.resourcemanager.trafficmanager.models.Region

Implements

public final class Region
implements JsonSerializable<Region>

Class representing a region in the Geographic hierarchy used with the Geographic traffic routing method.

Constructor Summary

Constructor Description
Region()

Creates an instance of Region class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: The code of the region.

static Region fromJson(JsonReader jsonReader)

Reads an instance of Region from the JsonReader.

String name()

Get the name property: The name of the region.

List<Region> regions()

Get the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Region withCode(String code)

Set the code property: The code of the region.

Region withName(String name)

Set the name property: The name of the region.

Region withRegions(List<Region> regions)

Set the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy.

Methods inherited from java.lang.Object

Constructor Details

Region

public Region()

Creates an instance of Region class.

Method Details

code

public String code()

Get the code property: The code of the region.

Returns:

the code value.

fromJson

public static Region fromJson(JsonReader jsonReader)

Reads an instance of Region from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Region 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 Region.

name

public String name()

Get the name property: The name of the region.

Returns:

the name value.

regions

public List regions()

Get the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy.

Returns:

the regions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCode

public Region withCode(String code)

Set the code property: The code of the region.

Parameters:

code - the code value to set.

Returns:

the Region object itself.

withName

public Region withName(String name)

Set the name property: The name of the region.

Parameters:

name - the name value to set.

Returns:

the Region object itself.

withRegions

public Region withRegions(List regions)

Set the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy.

Parameters:

regions - the regions value to set.

Returns:

the Region object itself.

Applies to