Class SharingProfile
java.lang.Object
com.azure.resourcemanager.compute.models.SharingProfile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SharingProfile>
public final class SharingProfile
extends Object
implements com.azure.json.JsonSerializable<SharingProfile>
Profile for gallery sharing to subscription or tenant.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.static SharingProfilefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SharingProfile from the JsonReader.groups()Get the groups property: A list of sharing profile groups.Get the permissions property: This property allows you to specify the permission of sharing gallery.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCommunityGalleryInfo(CommunityGalleryInfo communityGalleryInfo) Set the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.withPermissions(GallerySharingPermissionTypes permissions) Set the permissions property: This property allows you to specify the permission of sharing gallery.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SharingProfile
public SharingProfile()Creates an instance of SharingProfile class.
-
-
Method Details
-
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.
-
withPermissions
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.
-
groups
Get the groups property: A list of sharing profile groups.- Returns:
- the groups value.
-
communityGalleryInfo
Get the communityGalleryInfo property: Information of community gallery if current gallery is shared to community.- Returns:
- the communityGalleryInfo value.
-
withCommunityGalleryInfo
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SharingProfile>- Throws:
IOException
-
fromJson
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.
-