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 classImmutableFolderContent.BuilderBuilds instances of typeImmutableFolderContent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFolderContent.Builderbuilder()Creates a builder forImmutableFolderContent.static ImmutableFolderContentcopyOf(FolderContent instance)Creates an immutable copy of aFolderContentvalue.URIdownloadUrl()Content download URLbooleanequals(Object another)This instance is equal to all instances ofImmutableFolderContentthat have equal attribute values.URIgitUrl()Git blob API URLinthashCode()Computes a hash code from attributes:sha,url,type,size,name,path,gitUrl,htmlUrl,downloadUrl.URIhtmlUrl()Content URLStringname()Content name.Stringpath()The content path.Stringsha()SHA.Integersize()Content size in bytesStringtoString()Prints the immutable valueFolderContentwith attribute values.Stringtype()Content type.URIurl()URL.ImmutableFolderContentwithDownloadUrl(URI value)Copy the current immutable object by setting a value for thedownloadUrlattribute.ImmutableFolderContentwithGitUrl(URI value)Copy the current immutable object by setting a value for thegitUrlattribute.ImmutableFolderContentwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableFolderContentwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableFolderContentwithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableFolderContentwithSha(String value)Copy the current immutable object by setting a value for theshaattribute.ImmutableFolderContentwithSize(Integer value)Copy the current immutable object by setting a value for thesizeattribute.ImmutableFolderContentwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableFolderContentwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
type
@Nullable public String type()
Content type. E.g file, dir, symlink, submodule- Specified by:
typein interfaceFolderContent
-
size
@Nullable public Integer size()
Content size in bytes- Specified by:
sizein interfaceFolderContent
-
name
@Nullable public String name()
Content name. E.g. file name- Specified by:
namein interfaceFolderContent
-
path
@Nullable public String path()
The content path.- Specified by:
pathin interfaceFolderContent
-
gitUrl
@Nullable public URI gitUrl()
Git blob API URL- Specified by:
gitUrlin interfaceFolderContent
-
htmlUrl
@Nullable public URI htmlUrl()
Content URL- Specified by:
htmlUrlin interfaceFolderContent
-
downloadUrl
@Nullable public URI downloadUrl()
Content download URL- Specified by:
downloadUrlin interfaceFolderContent
-
withSha
public final ImmutableFolderContent withSha(@Nullable String value)
Copy the current immutable object by setting a value for theshaattribute. 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
thisobject
-
withUrl
public final ImmutableFolderContent withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. 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
thisobject
-
withType
public final ImmutableFolderContent withType(@Nullable String value)
Copy the current immutable object by setting a value for thetypeattribute. 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
thisobject
-
withSize
public final ImmutableFolderContent withSize(@Nullable Integer value)
Copy the current immutable object by setting a value for thesizeattribute. 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
thisobject
-
withName
public final ImmutableFolderContent withName(@Nullable String value)
Copy the current immutable object by setting a value for thenameattribute. 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
thisobject
-
withPath
public final ImmutableFolderContent withPath(@Nullable String value)
Copy the current immutable object by setting a value for thepathattribute. 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
thisobject
-
withGitUrl
public final ImmutableFolderContent withGitUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thegitUrlattribute. 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
thisobject
-
withHtmlUrl
public final ImmutableFolderContent withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. 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
thisobject
-
withDownloadUrl
public final ImmutableFolderContent withDownloadUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thedownloadUrlattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFolderContentthat 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 valueFolderContentwith attribute values.
-
copyOf
public static ImmutableFolderContent copyOf(FolderContent instance)
Creates an immutable copy of aFolderContentvalue. 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) // nullablesha.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
-
-