Package com.spotify.github.v3.checks
Class ImmutableApp
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableApp
-
- All Implemented Interfaces:
App
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableApp extends Object implements App
Immutable implementation ofApp.Use the builder to create immutable instances:
ImmutableApp.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableApp.BuilderBuilds instances of typeImmutableApp.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableApp.Builderbuilder()Creates a builder forImmutableApp.static ImmutableAppcopyOf(App instance)Creates an immutable copy of aAppvalue.ZonedDateTimecreatedAt()The date the App was created.Stringdescription()The App Description.booleanequals(Object another)This instance is equal to all instances ofImmutableAppthat have equal attribute values.List<String>events()Events list this App will consume, such as push, pull_request, etc.StringexternalUrl()External url string.inthashCode()Computes a hash code from attributes:id,slug,name,description,externalUrl,htmlUrl,createdAt,updatedAt,permissions,events,installationsCount.StringhtmlUrl()Html url string.Integerid()The App ID.Optional<Integer>installationsCount()Installation count of the App.Stringname()The App nameMap<String,String>permissions()The permissions the installation of the app has.Optional<String>slug()The URL-friendly name of the GitHub App.StringtoString()Prints the immutable valueAppwith attribute values.ZonedDateTimeupdatedAt()The date the App was updated.ImmutableAppwithCreatedAt(ZonedDateTime value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableAppwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableAppwithEvents(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableAppwithEvents(String... elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableAppwithExternalUrl(String value)Copy the current immutable object by setting a value for theexternalUrlattribute.ImmutableAppwithHtmlUrl(String value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableAppwithId(Integer value)Copy the current immutable object by setting a value for theidattribute.ImmutableAppwithInstallationsCount(int value)Copy the current immutable object by setting a present value for the optionalinstallationsCountattribute.ImmutableAppwithInstallationsCount(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theinstallationsCountattribute.ImmutableAppwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableAppwithPermissions(Map<String,? extends String> entries)Copy the current immutable object by replacing thepermissionsmap with the specified map.ImmutableAppwithSlug(String value)Copy the current immutable object by setting a present value for the optionalslugattribute.ImmutableAppwithSlug(Optional<String> optional)Copy the current immutable object by setting an optional value for theslugattribute.ImmutableAppwithUpdatedAt(ZonedDateTime value)Copy the current immutable object by setting a value for theupdatedAtattribute.
-
-
-
Method Detail
-
description
public String description()
The App Description.- Specified by:
descriptionin interfaceApp- Returns:
- the string
-
externalUrl
public String externalUrl()
External url string.- Specified by:
externalUrlin interfaceApp- Returns:
- the string
-
htmlUrl
public String htmlUrl()
Html url string.
-
createdAt
public ZonedDateTime createdAt()
The date the App was created.
-
updatedAt
public ZonedDateTime updatedAt()
The date the App was updated.
-
permissions
public Map<String,String> permissions()
The permissions the installation of the app has.- Specified by:
permissionsin interfaceApp- Returns:
- the map with permissions
- See Also:
- "https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url -parameters/#github-app-permissions"
-
events
public List<String> events()
Events list this App will consume, such as push, pull_request, etc.
-
installationsCount
public Optional<Integer> installationsCount()
Installation count of the App.- Specified by:
installationsCountin interfaceApp- Returns:
- the optional count
-
withId
public final ImmutableApp withId(Integer value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withSlug
public final ImmutableApp withSlug(String value)
Copy the current immutable object by setting a present value for the optionalslugattribute.- Parameters:
value- The value for slug- Returns:
- A modified copy of
thisobject
-
withSlug
public final ImmutableApp withSlug(Optional<String> optional)
Copy the current immutable object by setting an optional value for theslugattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for slug- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutableApp withName(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- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableApp withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withExternalUrl
public final ImmutableApp withExternalUrl(String value)
Copy the current immutable object by setting a value for theexternalUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for externalUrl- Returns:
- A modified copy of the
thisobject
-
withHtmlUrl
public final ImmutableApp withHtmlUrl(String value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for htmlUrl- Returns:
- A modified copy of the
thisobject
-
withCreatedAt
public final ImmutableApp withCreatedAt(ZonedDateTime value)
Copy the current immutable object by setting a value for thecreatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdAt- Returns:
- A modified copy of the
thisobject
-
withUpdatedAt
public final ImmutableApp withUpdatedAt(ZonedDateTime value)
Copy the current immutable object by setting a value for theupdatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updatedAt- Returns:
- A modified copy of the
thisobject
-
withPermissions
public final ImmutableApp withPermissions(Map<String,? extends String> entries)
Copy the current immutable object by replacing thepermissionsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the permissions map- Returns:
- A modified copy of
thisobject
-
withEvents
public final ImmutableApp withEvents(String... elements)
Copy the current immutable object with elements that replace the content ofevents.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEvents
public final ImmutableApp withEvents(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofevents. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of events elements to set- Returns:
- A modified copy of
thisobject
-
withInstallationsCount
public final ImmutableApp withInstallationsCount(int value)
Copy the current immutable object by setting a present value for the optionalinstallationsCountattribute.- Parameters:
value- The value for installationsCount- Returns:
- A modified copy of
thisobject
-
withInstallationsCount
public final ImmutableApp withInstallationsCount(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theinstallationsCountattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for installationsCount- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableAppthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,slug,name,description,externalUrl,htmlUrl,createdAt,updatedAt,permissions,events,installationsCount.
-
toString
public String toString()
Prints the immutable valueAppwith attribute values.
-
copyOf
public static ImmutableApp copyOf(App instance)
Creates an immutable copy of aAppvalue. 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 App instance
-
builder
public static ImmutableApp.Builder builder()
Creates a builder forImmutableApp.ImmutableApp.builder() .id(Integer) // requiredid.slug(String) // optionalslug.name(String) // requiredname.description(String) // requireddescription.externalUrl(String) // requiredexternalUrl.htmlUrl(String) // requiredhtmlUrl.createdAt(java.time.ZonedDateTime) // requiredcreatedAt.updatedAt(java.time.ZonedDateTime) // requiredupdatedAt.putPermissions|putAllPermissions(String => String) //permissionsmappings .addEvents|addAllEvents(String) //eventselements .installationsCount(Integer) // optionalinstallationsCount.build();- Returns:
- A new ImmutableApp builder
-
-