@Immutable public final class ModifyPolicyId extends org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId> implements ThingModifyCommand<ModifyPolicyId>
ThingCommand.JsonFieldsorg.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T>| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Name of the "Modify Policy ID" command.
|
static String |
TYPE
Type of this command.
|
RESOURCE_TYPE, TYPE_PREFIX| Modifier and Type | Method and Description |
|---|---|
protected void |
appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate) |
protected boolean |
canEqual(Object other) |
boolean |
changesAuthorization()
Checks whether this command may change authorization of the Thing.
|
boolean |
equals(Object obj) |
static ModifyPolicyId |
fromJson(org.eclipse.ditto.json.JsonObject jsonObject,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
ModifyPolicyId from a JSON object. |
static ModifyPolicyId |
fromJson(String jsonString,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
ModifyPolicyId from a JSON string. |
Optional<org.eclipse.ditto.json.JsonValue> |
getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion) |
String |
getPolicyId()
Returns the new Policy ID.
|
org.eclipse.ditto.json.JsonPointer |
getResourcePath() |
org.eclipse.ditto.model.base.json.JsonSchemaVersion[] |
getSupportedSchemaVersions()
ModifyPolicyId is only available in JsonSchemaVersion V_2.
|
String |
getThingId() |
int |
hashCode() |
static ModifyPolicyId |
of(String thingId,
String policyId,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Returns a command for modifying an attribute which is passed as argument.
|
ModifyPolicyId |
setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders) |
String |
toString() |
getDittoHeaders, getManifest, getType, toJsonclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, getResourceType, getTypePrefixgetImplementedSchemaVersion, toJson, toJsontoJson, toJsonString, toJsonStringgetLatestSchemaVersion, implementsSchemaVersion, implementsSchemaVersion, toJsonStringpublic static final String NAME
public static final String TYPE
public org.eclipse.ditto.model.base.json.JsonSchemaVersion[] getSupportedSchemaVersions()
getSupportedSchemaVersions in interface org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>public static ModifyPolicyId of(String thingId, String policyId, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
thingId - the ID of the thing on which to modify the Policy ID.policyId - the Policy ID to set.dittoHeaders - the headers of the command.NullPointerException - if dittoHeaders is null.org.eclipse.ditto.model.things.ThingIdInvalidException - if the parsed thing ID did not comply to Thing.ID_REGEX.public static ModifyPolicyId fromJson(String jsonString, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
ModifyPolicyId from a JSON string.jsonString - the JSON string of which the command is to be created.dittoHeaders - the headers of the command.NullPointerException - if any argument is null.IllegalArgumentException - if jsonString is empty.org.eclipse.ditto.json.JsonParseException - if the passed in jsonString was not in the expected
format.org.eclipse.ditto.model.things.ThingIdInvalidException - if the parsed thing ID did not comply to Thing.ID_REGEX.public static ModifyPolicyId fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
ModifyPolicyId from a JSON object.jsonObject - the JSON object of which the command is to be created.dittoHeaders - the headers of the command.NullPointerException - if any argument is null.org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected
format.org.eclipse.ditto.model.things.ThingIdInvalidException - if the parsed thing ID did not comply to Thing.ID_REGEX.public String getPolicyId()
public String getThingId()
getThingId in interface org.eclipse.ditto.signals.base.WithThingIdpublic Optional<org.eclipse.ditto.json.JsonValue> getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion)
getEntity in interface org.eclipse.ditto.signals.base.WithOptionalEntitypublic org.eclipse.ditto.json.JsonPointer getResourcePath()
getResourcePath in interface org.eclipse.ditto.signals.base.WithResourceprotected void appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
appendPayload in class org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId>public ModifyPolicyId setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
setDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<ModifyPolicyId>setDittoHeaders in interface org.eclipse.ditto.signals.commands.base.Command<ModifyPolicyId>setDittoHeaders in interface ThingModifyCommand<ModifyPolicyId>setDittoHeaders in interface ThingCommand<ModifyPolicyId>public boolean changesAuthorization()
ThingModifyCommandchangesAuthorization in interface ThingModifyCommand<ModifyPolicyId>true if authorization would change, false otherwise.public int hashCode()
hashCode in class org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId>public boolean equals(@Nullable Object obj)
equals in class org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId>protected boolean canEqual(@Nullable Object other)
canEqual in class org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId>public String toString()
toString in class org.eclipse.ditto.signals.commands.base.AbstractCommand<ModifyPolicyId>Copyright © 2017–2018 Eclipse Foundation. All rights reserved.