Package org.projectnessie.model
Class ImmutableNessieConfiguration
- java.lang.Object
-
- org.projectnessie.model.NessieConfiguration
-
- org.projectnessie.model.ImmutableNessieConfiguration
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableNessieConfiguration extends NessieConfiguration
Immutable implementation ofNessieConfiguration.Use the builder to create immutable instances:
ImmutableNessieConfiguration.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNessieConfiguration.BuilderBuilds instances of typeImmutableNessieConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableNessieConfiguration.Builderbuilder()Creates a builder forImmutableNessieConfiguration.static ImmutableNessieConfigurationcopyOf(NessieConfiguration instance)Creates an immutable copy of aNessieConfigurationvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableNessieConfigurationthat have equal attribute values.StringgetDefaultBranch()The name of the default branch that the server will use unless an explicit branch was specified as an API call parameter.intgetMaxSupportedApiVersion()The maximum API version supported by the server.inthashCode()Computes a hash code from attributes:defaultBranch,maxSupportedApiVersion.StringtoString()Prints the immutable valueNessieConfigurationwith attribute values.ImmutableNessieConfigurationwithDefaultBranch(String value)Copy the current immutable object by setting a value for thedefaultBranchattribute.ImmutableNessieConfigurationwithMaxSupportedApiVersion(int value)Copy the current immutable object by setting a value for themaxSupportedApiVersionattribute.
-
-
-
Method Detail
-
getDefaultBranch
@Nullable public String getDefaultBranch()
The name of the default branch that the server will use unless an explicit branch was specified as an API call parameter.- Specified by:
getDefaultBranchin classNessieConfiguration
-
getMaxSupportedApiVersion
public int getMaxSupportedApiVersion()
The maximum API version supported by the server.API versions are numbered sequentially, as they are developed.
- Specified by:
getMaxSupportedApiVersionin classNessieConfiguration
-
withDefaultBranch
public final ImmutableNessieConfiguration withDefaultBranch(@Nullable String value)
Copy the current immutable object by setting a value for thedefaultBranchattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for defaultBranch (can benull)- Returns:
- A modified copy of the
thisobject
-
withMaxSupportedApiVersion
public final ImmutableNessieConfiguration withMaxSupportedApiVersion(int value)
Copy the current immutable object by setting a value for themaxSupportedApiVersionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxSupportedApiVersion- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableNessieConfigurationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:defaultBranch,maxSupportedApiVersion.
-
toString
public String toString()
Prints the immutable valueNessieConfigurationwith attribute values.
-
copyOf
public static ImmutableNessieConfiguration copyOf(NessieConfiguration instance)
Creates an immutable copy of aNessieConfigurationvalue. 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 NessieConfiguration instance
-
builder
public static ImmutableNessieConfiguration.Builder builder()
Creates a builder forImmutableNessieConfiguration.ImmutableNessieConfiguration.builder() .defaultBranch(String | null) // nullabledefaultBranch.maxSupportedApiVersion(int) // requiredmaxSupportedApiVersion.build();- Returns:
- A new ImmutableNessieConfiguration builder
-
-