docs: @SuppressWarnings({"unused", "WeakerAccess"})
      public void setOptOut(boolean userOptOut){
          final boolean enable = userOptOut;
          postAsyncSafely("setOptOut", new Runnable() {
              @Override
              public void run() {
                  // generate the data for a profile push to alert the server to the optOut state change
                  HashMap<String, Object> optOutMap = new HashMap<>();
                  optOutMap.put(Constants.CLEVERTAP_OPTOUT, enable);
  
                  // determine order of operations depending on enabled/disabled
                  if (enable) {  // if opting out first push profile event then set the flag
                      pushProfile(optOutMap);
                      setCurrentUserOptedOut(true);
                  } else {  // if opting back in first reset the flag to false then push the profile event
                      setCurrentUserOptedOut(false);
                      pushProfile(optOutMap);
                  }
                  // persist the new optOut state
                  String key = optOutKey();
                  if (key == null) {
                      getConfigLogger().verbose(getAccountId(), "Unable to persist user OptOut state, storage key is null");
                      return;
                  }
                  StorageHelper.putBoolean(context, storageKeyWithSuffix(key), enable);
                  getConfigLogger().verbose(getAccountId(), "Set current user OptOut state to: " + enable);
              }
          });
      }