Source Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.Source

Implements

public final class Source
implements JsonSerializable<Source>

The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.

Constructor Summary

Constructor Description
Source()

Creates an instance of Source class.

Method Summary

Modifier and Type Method and Description
String addr()

Get the addr property: The IP or hostname and the port of the registry node that generated the event.

static Source fromJson(JsonReader jsonReader)

Reads an instance of Source from the JsonReader.

String instanceId()

Get the instanceId property: The running instance of an application.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Source withAddr(String addr)

Set the addr property: The IP or hostname and the port of the registry node that generated the event.

Source withInstanceId(String instanceId)

Set the instanceId property: The running instance of an application.

Methods inherited from java.lang.Object

Constructor Details

Source

public Source()

Creates an instance of Source class.

Method Details

addr

public String 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.

fromJson

public static Source fromJson(JsonReader jsonReader)

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.

instanceId

public String instanceId()

Get the instanceId property: The running instance of an application. Changes after each restart.

Returns:

the instanceId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAddr

public Source withAddr(String addr)

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.

withInstanceId

public Source withInstanceId(String instanceId)

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.

Applies to