Package com.spotify.github.v3.repos
Class ImmutableFolderContent
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableFolderContent
-
- All Implemented Interfaces:
ShaLink
,FolderContent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFolderContent extends Object implements FolderContent
Immutable implementation ofFolderContent
.Use the builder to create immutable instances:
ImmutableFolderContent.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableFolderContent.Builder
Builds instances of typeImmutableFolderContent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFolderContent.Builder
builder()
Creates a builder forImmutableFolderContent
.static ImmutableFolderContent
copyOf(FolderContent instance)
Creates an immutable copy of aFolderContent
value.URI
downloadUrl()
Content download URLboolean
equals(Object another)
This instance is equal to all instances ofImmutableFolderContent
that have equal attribute values.URI
gitUrl()
Git blob API URLint
hashCode()
Computes a hash code from attributes:sha
,url
,type
,size
,name
,path
,gitUrl
,htmlUrl
,downloadUrl
.URI
htmlUrl()
Content URLString
name()
Content name.String
path()
The content path.String
sha()
SHA.Integer
size()
Content size in bytesString
toString()
Prints the immutable valueFolderContent
with attribute values.String
type()
Content type.URI
url()
URL.ImmutableFolderContent
withDownloadUrl(URI value)
Copy the current immutable object by setting a value for thedownloadUrl
attribute.ImmutableFolderContent
withGitUrl(URI value)
Copy the current immutable object by setting a value for thegitUrl
attribute.ImmutableFolderContent
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableFolderContent
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableFolderContent
withPath(String value)
Copy the current immutable object by setting a value for thepath
attribute.ImmutableFolderContent
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableFolderContent
withSize(Integer value)
Copy the current immutable object by setting a value for thesize
attribute.ImmutableFolderContent
withType(String value)
Copy the current immutable object by setting a value for thetype
attribute.ImmutableFolderContent
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
type
@Nullable public String type()
Content type. E.g file, dir, symlink, submodule- Specified by:
type
in interfaceFolderContent
-
size
@Nullable public Integer size()
Content size in bytes- Specified by:
size
in interfaceFolderContent
-
name
@Nullable public String name()
Content name. E.g. file name- Specified by:
name
in interfaceFolderContent
-
path
@Nullable public String path()
The content path.- Specified by:
path
in interfaceFolderContent
-
gitUrl
@Nullable public URI gitUrl()
Git blob API URL- Specified by:
gitUrl
in interfaceFolderContent
-
htmlUrl
@Nullable public URI htmlUrl()
Content URL- Specified by:
htmlUrl
in interfaceFolderContent
-
downloadUrl
@Nullable public URI downloadUrl()
Content download URL- Specified by:
downloadUrl
in interfaceFolderContent
-
withSha
public final ImmutableFolderContent withSha(@Nullable 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 (can benull
)- Returns:
- A modified copy of the
this
object
-
withUrl
public final ImmutableFolderContent withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for url (can benull
)- Returns:
- A modified copy of the
this
object
-
withType
public final ImmutableFolderContent withType(@Nullable String value)
Copy the current immutable object by setting a value for thetype
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for type (can benull
)- Returns:
- A modified copy of the
this
object
-
withSize
public final ImmutableFolderContent withSize(@Nullable Integer value)
Copy the current immutable object by setting a value for thesize
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for size (can benull
)- Returns:
- A modified copy of the
this
object
-
withName
public final ImmutableFolderContent withName(@Nullable String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name (can benull
)- Returns:
- A modified copy of the
this
object
-
withPath
public final ImmutableFolderContent withPath(@Nullable String value)
Copy the current immutable object by setting a value for thepath
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for path (can benull
)- Returns:
- A modified copy of the
this
object
-
withGitUrl
public final ImmutableFolderContent withGitUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thegitUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for gitUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withHtmlUrl
public final ImmutableFolderContent withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for htmlUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withDownloadUrl
public final ImmutableFolderContent withDownloadUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thedownloadUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for downloadUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableFolderContent
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha
,url
,type
,size
,name
,path
,gitUrl
,htmlUrl
,downloadUrl
.
-
toString
public String toString()
Prints the immutable valueFolderContent
with attribute values.
-
copyOf
public static ImmutableFolderContent copyOf(FolderContent instance)
Creates an immutable copy of aFolderContent
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 FolderContent instance
-
builder
public static ImmutableFolderContent.Builder builder()
Creates a builder forImmutableFolderContent
.ImmutableFolderContent.builder() .sha(String | null) // nullable
sha
.url(java.net.URI | null) // nullableurl
.type(String | null) // nullabletype
.size(Integer | null) // nullablesize
.name(String | null) // nullablename
.path(String | null) // nullablepath
.gitUrl(java.net.URI | null) // nullablegitUrl
.htmlUrl(java.net.URI | null) // nullablehtmlUrl
.downloadUrl(java.net.URI | null) // nullabledownloadUrl
.build();- Returns:
- A new ImmutableFolderContent builder
-
-