Authorization Class

  • java.lang.Object
    • com.azure.resourcemanager.security.models.Authorization

Implements

public final class Authorization
implements JsonSerializable<Authorization>

Authorization payload.

Constructor Summary

Constructor Description
Authorization()

Creates an instance of Authorization class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens.

static Authorization fromJson(JsonReader jsonReader)

Reads an instance of Authorization from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Authorization withCode(String code)

Set the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens.

Methods inherited from java.lang.Object

Constructor Details

Authorization

public Authorization()

Creates an instance of Authorization class.

Method Details

code

public String code()

Get the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens. Only used during PUT/PATCH operations. The secret is cleared during GET.

Returns:

the code value.

fromJson

public static Authorization fromJson(JsonReader jsonReader)

Reads an instance of Authorization from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCode

public Authorization withCode(String code)

Set the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens. Only used during PUT/PATCH operations. The secret is cleared during GET.

Parameters:

code - the code value to set.

Returns:

the Authorization object itself.

Applies to