Partager via


SharingProfile Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.SharingProfile

Implements

public final class SharingProfile
implements JsonSerializable<SharingProfile>

Profile for gallery sharing to subscription or tenant.

Constructor Summary

Constructor Description
SharingProfile()

Creates an instance of SharingProfile class.

Method Summary

Modifier and Type Method and Description
CommunityGalleryInfo communityGalleryInfo()

Get the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.

static SharingProfile fromJson(JsonReader jsonReader)

Reads an instance of SharingProfile from the JsonReader.

List<SharingProfileGroup> groups()

Get the groups property: A list of sharing profile groups.

GallerySharingPermissionTypes permissions()

Get the permissions property: This property allows you to specify the permission of sharing gallery.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SharingProfile withCommunityGalleryInfo(CommunityGalleryInfo communityGalleryInfo)

Set the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.

SharingProfile withPermissions(GallerySharingPermissionTypes permissions)

Set the permissions property: This property allows you to specify the permission of sharing gallery.

Methods inherited from java.lang.Object

Constructor Details

SharingProfile

public SharingProfile()

Creates an instance of SharingProfile class.

Method Details

communityGalleryInfo

public CommunityGalleryInfo communityGalleryInfo()

Get the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.

Returns:

the communityGalleryInfo value.

fromJson

public static SharingProfile fromJson(JsonReader jsonReader)

Reads an instance of SharingProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

groups

public List groups()

Get the groups property: A list of sharing profile groups.

Returns:

the groups value.

permissions

public GallerySharingPermissionTypes permissions()

Get the permissions property: This property allows you to specify the permission of sharing gallery. Possible values are: **Private,** **Groups,** **Community.**.

Returns:

the permissions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCommunityGalleryInfo

public SharingProfile withCommunityGalleryInfo(CommunityGalleryInfo communityGalleryInfo)

Set the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.

Parameters:

communityGalleryInfo - the communityGalleryInfo value to set.

Returns:

the SharingProfile object itself.

withPermissions

public SharingProfile withPermissions(GallerySharingPermissionTypes permissions)

Set the permissions property: This property allows you to specify the permission of sharing gallery. Possible values are: **Private,** **Groups,** **Community.**.

Parameters:

permissions - the permissions value to set.

Returns:

the SharingProfile object itself.

Applies to