code: public ApiResponse<ApiSuccessResponse> addAttachmentWithHttpInfo(String mediatype, String id, File attachment, String operationId) throws ApiException {
          com.squareup.okhttp.Call call = addAttachmentValidateBeforeCall(mediatype, id, attachment, operationId, null, null);
          Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
docs: Add an attachment to the open-media interaction
  Add an attachment to the interaction specified in the id path parameter
  @param mediatype media-type of interaction to add attachment (required)
  @param id id of interaction (required)
  @param attachment The file to upload. (optional)
  @param operationId operationId associated to the request (optional)
  @return ApiResponse&lt;ApiSuccessResponse&gt;
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body