FailoverGroupReadOnlyEndpoint Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint

Implements

public final class FailoverGroupReadOnlyEndpoint
implements JsonSerializable<FailoverGroupReadOnlyEndpoint>

Read-only endpoint of the failover group instance.

Constructor Summary

Constructor Description
FailoverGroupReadOnlyEndpoint()

Creates an instance of FailoverGroupReadOnlyEndpoint class.

Method Summary

Modifier and Type Method and Description
ReadOnlyEndpointFailoverPolicy failoverPolicy()

Get the failoverPolicy property: Failover policy of the read-only endpoint for the failover group.

static FailoverGroupReadOnlyEndpoint fromJson(JsonReader jsonReader)

Reads an instance of FailoverGroupReadOnlyEndpoint from the JsonReader.

String targetServer()

Get the targetServer property: The target partner server where the read-only endpoint points to.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

FailoverGroupReadOnlyEndpoint withFailoverPolicy(ReadOnlyEndpointFailoverPolicy failoverPolicy)

Set the failoverPolicy property: Failover policy of the read-only endpoint for the failover group.

FailoverGroupReadOnlyEndpoint withTargetServer(String targetServer)

Set the targetServer property: The target partner server where the read-only endpoint points to.

Methods inherited from java.lang.Object

Constructor Details

FailoverGroupReadOnlyEndpoint

public FailoverGroupReadOnlyEndpoint()

Creates an instance of FailoverGroupReadOnlyEndpoint class.

Method Details

failoverPolicy

public ReadOnlyEndpointFailoverPolicy failoverPolicy()

Get the failoverPolicy property: Failover policy of the read-only endpoint for the failover group.

Returns:

the failoverPolicy value.

fromJson

public static FailoverGroupReadOnlyEndpoint fromJson(JsonReader jsonReader)

Reads an instance of FailoverGroupReadOnlyEndpoint from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

targetServer

public String targetServer()

Get the targetServer property: The target partner server where the read-only endpoint points to.

Returns:

the targetServer value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFailoverPolicy

public FailoverGroupReadOnlyEndpoint withFailoverPolicy(ReadOnlyEndpointFailoverPolicy failoverPolicy)

Set the failoverPolicy property: Failover policy of the read-only endpoint for the failover group.

Parameters:

failoverPolicy - the failoverPolicy value to set.

Returns:

the FailoverGroupReadOnlyEndpoint object itself.

withTargetServer

public FailoverGroupReadOnlyEndpoint withTargetServer(String targetServer)

Set the targetServer property: The target partner server where the read-only endpoint points to.

Parameters:

targetServer - the targetServer value to set.

Returns:

the FailoverGroupReadOnlyEndpoint object itself.

Applies to