Package com.fasterxml.jackson.annotation

# Enum JsonProperty.Access

java.lang.Object
java.lang.Enum<JsonProperty.Access>
com.fasterxml.jackson.annotation.JsonProperty.Access

All Implemented Interfaces:
  `Serializable`, `Comparable<JsonProperty.Access>`, `java.lang.constant.Constable`

Enclosing class:
  `JsonProperty`

public static enum JsonProperty.Access extends Enum<JsonProperty.Access>
Various options for `JsonProperty.access()` property, specifying how property may be accessed during serialization ("read") and deserialization ("write") (note that the direction of read and write is from perspective of the property, not from external data format: this may be confusing in some contexts).

Note that while this annotation modifies access to annotated property, its effects may be further overridden by `JsonIgnore` property: if both annotations are present on an accessors, `JsonIgnore` has precedence over this property. This annotation property is, however, preferred over use of "split" `JsonIgnore`/`JsonProperty` combination.

Since:
  2.6

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`AUTO`
Access setting which means that visibility rules are to be used to automatically determine read- and/or write-access of this property.
`READ_ONLY`
Access setting that means that the property may only be read for serialization (value accessed via "getter" Method, or read from Field) but not written (set) during deserialization.
`READ_WRITE`
Access setting that means that the property will be accessed for both serialization (writing out values as external representation) and deserialization (reading values from external representation), regardless of visibility rules.
`WRITE_ONLY`
Access setting that means that the property may only be written (set) as part of deserialization (using "setter" method, or assigning to Field, or passed as Creator argument) but will not be read (get) for serialization, that is, the value of the property is not included in serialization.

## Method Summary

Modifier and Type
Method
Description
`static JsonProperty.Access`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static JsonProperty.Access[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### AUTO

public static final JsonProperty.Access AUTO
Access setting which means that visibility rules are to be used to automatically determine read- and/or write-access of this property.

### READ_ONLY

public static final JsonProperty.Access READ_ONLY
Access setting that means that the property may only be read for serialization (value accessed via "getter" Method, or read from Field) but not written (set) during deserialization. Put another way, this would reflect "read-only POJO", in which value contained may be read but not written/set.

### WRITE_ONLY

public static final JsonProperty.Access WRITE_ONLY
Access setting that means that the property may only be written (set) as part of deserialization (using "setter" method, or assigning to Field, or passed as Creator argument) but will not be read (get) for serialization, that is, the value of the property is not included in serialization.

### READ_WRITE

public static final JsonProperty.Access READ_WRITE
Access setting that means that the property will be accessed for both serialization (writing out values as external representation) and deserialization (reading values from external representation), regardless of visibility rules.

## Method Details

### values

public static JsonProperty.Access[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static JsonProperty.Access valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null