Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pmossman committed Aug 8, 2022
1 parent 679b602 commit 677b477
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,14 @@ public interface Configs {

/**
* Define the header name used to authenticate with the Airbyte API
*
* @return
*/
String getAirbyteApiAuthHeaderName();

/**
* Define the header value used to authenticate with the Airbyte API
*
* @return
*/
String getAirbyteApiAuthHeaderValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public static StateWrapper toInternal(final @Nullable ConnectionState apiConnect
}

/**
* Convert to API representation of state type. API has an additional type (NOT_SET). This represents the case where no state is saved so we do not
* know the state type.
* Convert to API representation of state type. API has an additional type (NOT_SET). This
* represents the case where no state is saved so we do not know the state type.
*
* @param stateWrapper state to convert
* @return api representation of state type
Expand All @@ -84,8 +84,8 @@ private static ConnectionStateType convertStateTypeToApi(final @Nullable StateWr
}

/**
* Convert to client representation of state type. The client model has an additional type (NOT_SET). This represents the case where no state is saved so we do not
* know the state type.
* Convert to client representation of state type. The client model has an additional type
* (NOT_SET). This represents the case where no state is saved so we do not know the state type.
*
* @param stateWrapper state to convert
* @return client representation of state type
Expand Down Expand Up @@ -113,10 +113,12 @@ private static Optional<StateType> convertStateTypeToInternal(final @Nullable Co
}

/**
* If wrapper is of type global state, returns API representation of global state. Otherwise, empty optional.
* If wrapper is of type global state, returns API representation of global state. Otherwise, empty
* optional.
*
* @param stateWrapper state wrapper to extract from
* @return api representation of global state if state wrapper is type global. Otherwise, empty optional.
* @return api representation of global state if state wrapper is type global. Otherwise, empty
* optional.
*/
private static Optional<GlobalState> globalStateToApi(final @Nullable StateWrapper stateWrapper) {
if (stateWrapper != null
Expand All @@ -135,10 +137,12 @@ private static Optional<GlobalState> globalStateToApi(final @Nullable StateWrapp
}

/**
* If wrapper is of type global state, returns client representation of global state. Otherwise, empty optional.
* If wrapper is of type global state, returns client representation of global state. Otherwise,
* empty optional.
*
* @param stateWrapper state wrapper to extract from
* @return client representation of global state if state wrapper is type global. Otherwise, empty optional.
* @return client representation of global state if state wrapper is type global. Otherwise, empty
* optional.
*/
private static Optional<io.airbyte.api.client.model.generated.GlobalState> globalStateToClient(final @Nullable StateWrapper stateWrapper) {
if (stateWrapper != null
Expand All @@ -157,7 +161,8 @@ private static Optional<io.airbyte.api.client.model.generated.GlobalState> globa
}

/**
* If API state is of type global, returns internal representation of global state. Otherwise, empty optional.
* If API state is of type global, returns internal representation of global state. Otherwise, empty
* optional.
*
* @param connectionState API state representation to extract from
* @return global state message if API state is of type global. Otherwise, empty optional.
Expand All @@ -179,10 +184,12 @@ private static Optional<AirbyteStateMessage> globalStateToInternal(final @Nullab
}

/**
* If wrapper is of type stream state, returns API representation of stream state. Otherwise, empty optional.
* If wrapper is of type stream state, returns API representation of stream state. Otherwise, empty
* optional.
*
* @param stateWrapper state wrapper to extract from
* @return api representation of stream state if state wrapper is type stream. Otherwise, empty optional.
* @return api representation of stream state if state wrapper is type stream. Otherwise, empty
* optional.
*/
private static Optional<List<StreamState>> streamStateToApi(final @Nullable StateWrapper stateWrapper) {
if (stateWrapper != null && stateWrapper.getStateType() == StateType.STREAM && stateWrapper.getStateMessages() != null) {
Expand All @@ -197,10 +204,12 @@ private static Optional<List<StreamState>> streamStateToApi(final @Nullable Stat
}

/**
* If wrapper is of type stream state, returns client representation of stream state. Otherwise, empty optional.
* If wrapper is of type stream state, returns client representation of stream state. Otherwise,
* empty optional.
*
* @param stateWrapper state wrapper to extract from
* @return client representation of stream state if state wrapper is type stream. Otherwise, empty optional.
* @return client representation of stream state if state wrapper is type stream. Otherwise, empty
* optional.
*/
private static Optional<List<io.airbyte.api.client.model.generated.StreamState>> streamStateToClient(final @Nullable StateWrapper stateWrapper) {
if (stateWrapper != null && stateWrapper.getStateType() == StateType.STREAM && stateWrapper.getStateMessages() != null) {
Expand All @@ -215,10 +224,12 @@ private static Optional<List<io.airbyte.api.client.model.generated.StreamState>>
}

/**
* If API state is of type stream, returns internal representation of stream state. Otherwise, empty optional.
* If API state is of type stream, returns internal representation of stream state. Otherwise, empty
* optional.
*
* @param connectionState API representation of state to extract from
* @return internal representation of stream state if API state representation is of type stream. Otherwise, empty optional.
* @return internal representation of stream state if API state representation is of type stream.
* Otherwise, empty optional.
*/
private static Optional<List<AirbyteStateMessage>> streamStateToInternal(final @Nullable ConnectionState connectionState) {
if (connectionState != null && connectionState.getStateType() == ConnectionStateType.STREAM && connectionState.getStreamState() != null) {
Expand Down

0 comments on commit 677b477

Please sign in to comment.