2.9.3 (latest) 2.9.2 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4

```java
public final class AtomPatchRelativeToOriginalContent extends AbstractXmlHttpContent
```
Beta   

Serializes an optimal Atom XML PATCH HTTP content based on the data key/value mapping object for
an Atom entry, by comparing the original value to the patched value.

Sample usage:

```java

 static void setContent(HttpRequest request,
                        XmlNamespaceDictionary namespaceDictionary,
                        Object originalEntry, Object patchedEntry) {
   request.setContent(new AtomPatchRelativeToOriginalContent(
       namespaceDictionary, originalEntry, patchedEntry));
 }
 
```

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractHttpContent](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.AbstractHttpContent.md.txt) \> com.google.api.client.http.xml.AbstractXmlHttpContent \> AtomPatchRelativeToOriginalContent

## Inherited Members

com.google.api.client.http.AbstractHttpContent.computeLength() com.google.api.client.http.AbstractHttpContent.computeLength(com.google.api.client.http.HttpContent) com.google.api.client.http.AbstractHttpContent.getCharset() com.google.api.client.http.AbstractHttpContent.getLength() com.google.api.client.http.AbstractHttpContent.getMediaType() com.google.api.client.http.AbstractHttpContent.getType() com.google.api.client.http.AbstractHttpContent.retrySupported() com.google.api.client.http.xml.AbstractXmlHttpContent.getNamespaceDictionary() com.google.api.client.http.xml.AbstractXmlHttpContent.setMediaType(com.google.api.client.http.HttpMediaType) com.google.api.client.http.xml.AbstractXmlHttpContent.writeTo(java.io.OutputStream) com.google.api.client.http.xml.AbstractXmlHttpContent.writeTo(org.xmlpull.v1.XmlSerializer) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Constructors

### AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry)

```java
public AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry)
```

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `namespaceDictionary` | `com.google.api.client.xml.XmlNamespaceDictionary` XML namespace dictionary |
| `originalEntry` | `Object` |
| `patchedEntry` | `Object` |

## Methods

### getOriginalEntry()

```java
public final Object getOriginalEntry()
```
Returns the data key name/value pairs for the original unmodified Atom entry.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Object` |   |

### getPatchedEntry()

```java
public final Object getPatchedEntry()
```
Returns the data key name/value pairs for the updated/patched Atom entry.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Object` |   |

### setMediaType(HttpMediaType mediaType)

```java
public AtomPatchRelativeToOriginalContent setMediaType(HttpMediaType mediaType)
```

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `mediaType` | `com.google.api.client.http.HttpMediaType` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AtomPatchRelativeToOriginalContent` |   |

**Overrides** com.google.api.client.http.xml.AbstractXmlHttpContent.setMediaType(com.google.api.client.http.HttpMediaType)

### writeTo(XmlSerializer serializer)

```java
protected void writeTo(XmlSerializer serializer)
```

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serializer` | `org.xmlpull.v1.XmlSerializer` |

**Overrides** com.google.api.client.http.xml.AbstractXmlHttpContent.writeTo(org.xmlpull.v1.XmlSerializer)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `IOException` |   |