Class Source
java.lang.Object
com.azure.resourcemanager.containerregistry.models.Source
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Source>
The registry node that generated the event. Put differently, while the actor initiates the event, the source
generates it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddr()Get the addr property: The IP or hostname and the port of the registry node that generated the event.static SourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Source from the JsonReader.Get the instanceId property: The running instance of an application.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the addr property: The IP or hostname and the port of the registry node that generated the event.withInstanceId(String instanceId) Set the instanceId property: The running instance of an application.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
-
Source
public Source()Creates an instance of Source class.
-
-
Method Details
-
addr
Get the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port.- Returns:
- the addr value.
-
withAddr
Set the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port.- Parameters:
addr- the addr value to set.- Returns:
- the Source object itself.
-
instanceId
Get the instanceId property: The running instance of an application. Changes after each restart.- Returns:
- the instanceId value.
-
withInstanceId
Set the instanceId property: The running instance of an application. Changes after each restart.- Parameters:
instanceId- the instanceId value to set.- Returns:
- the Source 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<Source>- Throws:
IOException
-
fromJson
Reads an instance of Source from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Source 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 Source.
-