DistributedAvailabilityGroupSetRole Class
- java.
lang. Object - com.
azure. resourcemanager. sql. models. DistributedAvailabilityGroupSetRole
- com.
Implements
public final class DistributedAvailabilityGroupSetRole
implements JsonSerializable<DistributedAvailabilityGroupSetRole>
Distributed availability group failover request.
Constructor Summary
| Constructor | Description |
|---|---|
| DistributedAvailabilityGroupSetRole() |
Creates an instance of Distributed |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Distributed |
fromJson(JsonReader jsonReader)
Reads an instance of Distributed |
|
Instance |
instanceRole()
Get the instance |
|
Role |
roleChangeType()
Get the role |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Distributed |
withInstanceRole(InstanceRole instanceRole)
Set the instance |
|
Distributed |
withRoleChangeType(RoleChangeType roleChangeType)
Set the role |
Methods inherited from java.lang.Object
Constructor Details
DistributedAvailabilityGroupSetRole
public DistributedAvailabilityGroupSetRole()
Creates an instance of DistributedAvailabilityGroupSetRole class.
Method Details
fromJson
public static DistributedAvailabilityGroupSetRole fromJson(JsonReader jsonReader)
Reads an instance of DistributedAvailabilityGroupSetRole from the JsonReader.
Parameters:
Returns:
Throws:
instanceRole
public InstanceRole instanceRole()
Get the instanceRole property: New role of managed instance in a distributed availability group, can be Primary or Secondary.
Returns:
roleChangeType
public RoleChangeType roleChangeType()
Get the roleChangeType property: The type of the role change, can be Planned or Forced.
Returns:
toJson
validate
public void validate()
Validates the instance.
withInstanceRole
public DistributedAvailabilityGroupSetRole withInstanceRole(InstanceRole instanceRole)
Set the instanceRole property: New role of managed instance in a distributed availability group, can be Primary or Secondary.
Parameters:
Returns:
withRoleChangeType
public DistributedAvailabilityGroupSetRole withRoleChangeType(RoleChangeType roleChangeType)
Set the roleChangeType property: The type of the role change, can be Planned or Forced.
Parameters:
Returns: