hunk.code_window:                     Object expiresAtResponse = mappedResponse.get(Authentication.EXPIRES_AT);
                       Object expiresInResponse = mappedResponse.get(Authentication.EXPIRES_IN);
                       Instant expiresAt = null;
                       if (expiresAtResponse != null) {
                           expiresAt = Instant.ofEpochSecond(Long.valueOf((Integer) expiresAtResponse));
                       } else if (expiresInResponse != null) {
  
hunk.labels: keep keep keep keep replace keep
hunk.after_edit:                         expiresAt = Instant.ofEpochSecond(Long.parseLong(String.valueOf(expiresAtResponse)));
  
hunk.file_path: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/connections/OAuth2AuthorizationCode.java
hunk.type: replace
file: import { useDispatch } from "react-redux";
  import { focusWidget } from "actions/widgetActions";
  import {
    selectMultipleWidgetsAction,
    selectWidgetInitAction,
    shiftSelectWidgetsEntityExplorerInitAction,
  } from "actions/widgetSelectionActions";
  
  import { useCallback } from "react";
  
  export const useWidgetSelection = () => {
    const dispatch = useDispatch();
    return {
      selectWidget: useCallback(
        (widgetId?: string, isMultiSelect?: boolean) => {
          dispatch(selectWidgetInitAction(widgetId, isMultiSelect));
        },
        [dispatch],
      ),
      shiftSelectWidgetEntityExplorer: useCallback(
        (widgetId: string, siblingWidgets: string[]) => {
          dispatch(
            shiftSelectWidgetsEntityExplorerInitAction(widgetId, siblingWidgets),
          );
        },
        [dispatch],
      ),
      focusWidget: useCallback(
        (widgetId?: string) => dispatch(focusWidget(widgetId)),
        [dispatch],
      ),
      deselectAll: useCallback(() => dispatch(selectMultipleWidgetsAction([])), [
        dispatch,
      ]),
    };
  };
  