Поделиться через


AccessPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.AccessPolicy

Implements

public final class AccessPolicy
implements JsonSerializable<AccessPolicy>

The AccessPolicy model.

Constructor Summary

Constructor Description
AccessPolicy()

Creates an instance of AccessPolicy class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime expiryTime()

Get the expiryTime property: Expiry time of the access policy.

static AccessPolicy fromJson(JsonReader jsonReader)

Reads an instance of AccessPolicy from the JsonReader.

String permission()

Get the permission property: List of abbreviated permissions.

OffsetDateTime startTime()

Get the startTime property: Start time of the access policy.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AccessPolicy withExpiryTime(OffsetDateTime expiryTime)

Set the expiryTime property: Expiry time of the access policy.

AccessPolicy withPermission(String permission)

Set the permission property: List of abbreviated permissions.

AccessPolicy withStartTime(OffsetDateTime startTime)

Set the startTime property: Start time of the access policy.

Methods inherited from java.lang.Object

Constructor Details

AccessPolicy

public AccessPolicy()

Creates an instance of AccessPolicy class.

Method Details

expiryTime

public OffsetDateTime expiryTime()

Get the expiryTime property: Expiry time of the access policy.

Returns:

the expiryTime value.

fromJson

public static AccessPolicy fromJson(JsonReader jsonReader)

Reads an instance of AccessPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

permission

public String permission()

Get the permission property: List of abbreviated permissions.

Returns:

the permission value.

startTime

public OffsetDateTime startTime()

Get the startTime property: Start time of the access policy.

Returns:

the startTime value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExpiryTime

public AccessPolicy withExpiryTime(OffsetDateTime expiryTime)

Set the expiryTime property: Expiry time of the access policy.

Parameters:

expiryTime - the expiryTime value to set.

Returns:

the AccessPolicy object itself.

withPermission

public AccessPolicy withPermission(String permission)

Set the permission property: List of abbreviated permissions.

Parameters:

permission - the permission value to set.

Returns:

the AccessPolicy object itself.

withStartTime

public AccessPolicy withStartTime(OffsetDateTime startTime)

Set the startTime property: Start time of the access policy.

Parameters:

startTime - the startTime value to set.

Returns:

the AccessPolicy object itself.

Applies to