Package com.spotify.github.v3.git
Class ImmutableFileItem
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableFileItem
-
- All Implemented Interfaces:
FileItem
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFileItem extends Object implements FileItem
Immutable implementation ofFileItem
.Use the builder to create immutable instances:
ImmutableFileItem.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableFileItem.Builder
Builds instances of typeImmutableFileItem
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
additions()
URI
blobUrl()
static ImmutableFileItem.Builder
builder()
Creates a builder forImmutableFileItem
.Integer
changes()
URI
contentsUrl()
static ImmutableFileItem
copyOf(FileItem instance)
Creates an immutable copy of aFileItem
value.Integer
deletions()
Author commit user.boolean
equals(Object another)
This instance is equal to all instances ofImmutableFileItem
that have equal attribute values.String
filename()
Commit node_id.int
hashCode()
Computes a hash code from attributes:sha
,filename
,status
,additions
,deletions
,changes
,blobUrl
,rawUrl
,contentsUrl
,patch
.String
patch()
URI
rawUrl()
String
sha()
Commit sha value.String
status()
Commit API URL.String
toString()
Prints the immutable valueFileItem
with attribute values.ImmutableFileItem
withAdditions(Integer value)
Copy the current immutable object by setting a value for theadditions
attribute.ImmutableFileItem
withBlobUrl(URI value)
Copy the current immutable object by setting a value for theblobUrl
attribute.ImmutableFileItem
withChanges(Integer value)
Copy the current immutable object by setting a value for thechanges
attribute.ImmutableFileItem
withContentsUrl(URI value)
Copy the current immutable object by setting a value for thecontentsUrl
attribute.ImmutableFileItem
withDeletions(Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute.ImmutableFileItem
withFilename(String value)
Copy the current immutable object by setting a value for thefilename
attribute.ImmutableFileItem
withPatch(String value)
Copy the current immutable object by setting a value for thepatch
attribute.ImmutableFileItem
withRawUrl(URI value)
Copy the current immutable object by setting a value for therawUrl
attribute.ImmutableFileItem
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableFileItem
withStatus(String value)
Copy the current immutable object by setting a value for thestatus
attribute.
-
-
-
Method Detail
-
additions
@Nullable public Integer additions()
-
deletions
@Nullable public Integer deletions()
Author commit user.
-
changes
@Nullable public Integer changes()
-
blobUrl
@Nullable public URI blobUrl()
-
rawUrl
@Nullable public URI rawUrl()
-
contentsUrl
@Nullable public URI contentsUrl()
- Specified by:
contentsUrl
in interfaceFileItem
- Returns:
- The value of the
contentsUrl
attribute
-
patch
@Nullable public String patch()
-
withSha
public final ImmutableFileItem withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sha- Returns:
- A modified copy of the
this
object
-
withFilename
public final ImmutableFileItem withFilename(String value)
Copy the current immutable object by setting a value for thefilename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for filename- Returns:
- A modified copy of the
this
object
-
withStatus
public final ImmutableFileItem withStatus(@Nullable String value)
Copy the current immutable object by setting a value for thestatus
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for status (can benull
)- Returns:
- A modified copy of the
this
object
-
withAdditions
public final ImmutableFileItem withAdditions(@Nullable Integer value)
Copy the current immutable object by setting a value for theadditions
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for additions (can benull
)- Returns:
- A modified copy of the
this
object
-
withDeletions
public final ImmutableFileItem withDeletions(@Nullable Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for deletions (can benull
)- Returns:
- A modified copy of the
this
object
-
withChanges
public final ImmutableFileItem withChanges(@Nullable Integer value)
Copy the current immutable object by setting a value for thechanges
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for changes (can benull
)- Returns:
- A modified copy of the
this
object
-
withBlobUrl
public final ImmutableFileItem withBlobUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theblobUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for blobUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withRawUrl
public final ImmutableFileItem withRawUrl(@Nullable URI value)
Copy the current immutable object by setting a value for therawUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for rawUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withContentsUrl
public final ImmutableFileItem withContentsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thecontentsUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for contentsUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withPatch
public final ImmutableFileItem withPatch(@Nullable String value)
Copy the current immutable object by setting a value for thepatch
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for patch (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableFileItem
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha
,filename
,status
,additions
,deletions
,changes
,blobUrl
,rawUrl
,contentsUrl
,patch
.
-
toString
public String toString()
Prints the immutable valueFileItem
with attribute values.
-
copyOf
public static ImmutableFileItem copyOf(FileItem instance)
Creates an immutable copy of aFileItem
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable FileItem instance
-
builder
public static ImmutableFileItem.Builder builder()
Creates a builder forImmutableFileItem
.ImmutableFileItem.builder() .sha(String) // required
sha
.filename(String) // requiredfilename
.status(String | null) // nullablestatus
.additions(Integer | null) // nullableadditions
.deletions(Integer | null) // nullabledeletions
.changes(Integer | null) // nullablechanges
.blobUrl(java.net.URI | null) // nullableblobUrl
.rawUrl(java.net.URI | null) // nullablerawUrl
.contentsUrl(java.net.URI | null) // nullablecontentsUrl
.patch(String | null) // nullablepatch
.build();- Returns:
- A new ImmutableFileItem builder
-
-