Skip to content

Instantly share code, notes, and snippets.

@alin-turcu
Last active November 2, 2017 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alin-turcu/ae14e15e27374cbf94dc3a7603ceb908 to your computer and use it in GitHub Desktop.
Save alin-turcu/ae14e15e27374cbf94dc3a7603ceb908 to your computer and use it in GitHub Desktop.
@AutoValue
public abstract class LoginStateModel {
public static Builder builder() {
return new AutoValue_LoginStateModel.Builder();
}
public abstract Builder toBuilder();
public abstract LoginState getLoginState();
@Nullable
public abstract User getLoggedInUser();
@Nullable
public abstract Throwable getLoginException();
@AutoValue.Builder
public static abstract class Builder {
public abstract Builder setLoginState(LoginState loginState);
public abstract Builder setLoginException(Throwable loginException);
public abstract Builder setLoggedInUser(User user);
public abstract LoginStateModel build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment